Rev 5921 | Rev 11212 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5921 | Rev 11210 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | !! +exec+ +loop+ +jump+ |
1 | !! +exec+ +loop+ +jump+ |
- | 2 | tit:for |
|
2 |
|
3 | type:$type_exec |
3 |
|
4 | syntax:!for `var' = `start' to `end' [step `st' ]\ |
4 | $emphend [step $emph st $emphend ]</span> <br/>or<span class="tt"> |
- | |
5 | $ !for |
5 | $ !for `var' from `start' to `end' [step `st' ]\ |
6 | [step $emph st $emphend ]</span> <br/>or<span class="tt"> |
- | |
7 | $ !for |
6 | $ !for `var' in `list'<br/></span>\ |
8 | ... (multi-line content)<br/> |
7 | ... (multi-line content)<br/>\ |
9 | <span class="tt">!next</span> |
8 | <span class="tt">!next</span> |
10 |
|
9 | mean:For loop. In the first two forms, `var' goes from `start' to `end', with optional step `st'.\ |
11 | $emph start$emphend to $emph end$emphend, with optional step $emph |
- | |
12 | st$emphend. <br/> |
- | |
13 | In |
10 | <br/>In the last form, `var' takes successively items in the list\ |
14 |
|
11 | `list'. `list' is a list of items separated by commas. <br/>\ |
15 | commas. <br/> |
- | |
16 | The command |
- | |
17 |
|
12 | The command <pre>!break</pre>\ |
18 | within the |
13 | within the for loop breaks it. `continue' is not yet implemented in this version. <br/>\ |
19 | implemented in this version. <br/> |
- | |
20 | It is recommended that the variable name |
14 | It is recommended that the variable name `var' be added to the\ |
21 |
|
15 | <span class="tt">!next </span> line. This has no effect for the time being, but may be\ |
22 | used in future versions of wims. |
16 | used in future versions of wims. |