Browse Subversion Repository
Contents of /trunk/doc/en/html/macro/command/fornext.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: 1156 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>for, next</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>for, next</h1> |
15 |
|
16 |
<p> |
17 |
Repeats. |
18 |
</p> |
19 |
|
20 |
<pre class="macro-syntax"> |
21 |
for <intvar> <first> <last><br> |
22 |
...<br> |
23 |
...<br> |
24 |
next |
25 |
</pre> |
26 |
|
27 |
<h2>Remarks</h2> |
28 |
|
29 |
<p> |
30 |
Repeats the statements between "for" and "next" until the integer variable <intvar> has the value <last> at the 'next' statement.<br> |
31 |
The initial value of the <intvar> is <first>. If <last> is greater than <first>, <intvar> is incremented by 1 at the 'next' line. If <last> is less than <first>, <intvar> is decremented by 1 at the 'next' line. |
32 |
</p> |
33 |
|
34 |
<h2>Example</h2> |
35 |
|
36 |
<pre class="macro-example"> |
37 |
; Repeat ten times. |
38 |
for i 1 10 |
39 |
sendln 'abc' |
40 |
next |
41 |
|
42 |
; Repeat five times. |
43 |
for i 5 1 |
44 |
sendln 'abc' |
45 |
next |
46 |
</pre> |
47 |
|
48 |
</body> |
49 |
</html> |
|