Browse Subversion Repository
Contents of /trunk/doc/en/html/macro/command/waitrecv.html
Parent Directory
| Revision Log
Revision 3227 -
( show annotations)
( download)
( as text)
Tue Mar 24 15:10:33 2009 UTC
(15 years, 1 month ago)
by maya
File MIME type: text/html
File size: 1951 byte(s)
CVS から SVN へ移行: 改行コードを LF から CR+LF へ変換
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
2 |
"http://www.w3.org/TR/html4/strict.dtd"> |
3 |
<html> |
4 |
<head> |
5 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
6 |
<title>waitrecv</title> |
7 |
<meta http-equiv="Content-Style-Type" content="text/css"> |
8 |
<link rel="stylesheet" href="../../style.css" type="text/css"> |
9 |
</head> |
10 |
|
11 |
<body> |
12 |
|
13 |
|
14 |
<h1>waitrecv</h1> |
15 |
|
16 |
<p> |
17 |
Waits string. |
18 |
</p> |
19 |
|
20 |
<pre class="macro-syntax"> |
21 |
waitrecv <sub-string> <len> <pos> |
22 |
</pre> |
23 |
|
24 |
<h2>Remarks</h2> |
25 |
|
26 |
<p> |
27 |
Pauses until a string, which satisfies a condition, is received from the host, or until the timeout occurs. |
28 |
</p> |
29 |
|
30 |
<p> |
31 |
The condition is:<br> |
32 |
The length of the string is <len>, and the string contains the <sub-string> beginning at the <pos>th character.<br> |
33 |
For example, if <sub-string> is "def" and <len> is 9 and <pos> is 4, the string "abcdefghi" satisfies the condition. |
34 |
</p> |
35 |
|
36 |
<p> |
37 |
If such a string is received, it is saved in the system variable "inputstr". |
38 |
</p> |
39 |
|
40 |
<p> |
41 |
If the system variable "timeout" or "mtimeout" is greater than zero, the timeout occurs when <timeout>.<mtimeout> seconds have passed. If the timeout is less than or equal to zero, the timeout never occurs. |
42 |
</p> |
43 |
|
44 |
<p> |
45 |
These commands return one of the following values in the system variable "result": |
46 |
</p> |
47 |
|
48 |
<table> |
49 |
<tr> |
50 |
<th>Value</th> |
51 |
<th>Meaning</th> |
52 |
</tr> |
53 |
<tr> |
54 |
<td>-1</td> |
55 |
<td>A string, which contains the <sub-string> beginning at the <pos>th character, has been received, and saved in the "inputstr", but its length is less than <len> because of the timeout.</td> |
56 |
</tr> |
57 |
<tr> |
58 |
<td>0</td> |
59 |
<td>Timeout. No string, which satisfies the condition, has been received.</td> |
60 |
</tr> |
61 |
<tr> |
62 |
<td>1</td> |
63 |
<td>A string, which satisfies the condition, has been received, and saved in the "inputstr".</td> |
64 |
</tr> |
65 |
</table> |
66 |
|
67 |
</body> |
68 |
</html> |
| |