1,314
edits
No edit summary  | 
				|||
| Line 63: | Line 63: | ||
<syntaxhighlight lang="nasal">  | <syntaxhighlight lang="nasal">  | ||
for (preloop_initialization; # will be run prior to the first invocation of the loop, usually to initialize a loop counter  | for (preloop_initialization;   # will be run prior to the first invocation of the loop, usually to initialize a loop counter  | ||
      condition_during_loop;   |       condition_during_loop;    # will be run prior to each iteration, usually to check the loop counter  and cancel the loop if false  | ||
      post_iteration_expression # will be run after each iteration, usually to increment a loop counter  |       post_iteration_expression # will be run after each iteration, usually to increment a loop counter  | ||
) {  | ) {  | ||
| Line 84: | Line 84: | ||
<syntaxhighlight lang="nasal">  | <syntaxhighlight lang="nasal">  | ||
foreach (elem; list1) {   | foreach (elem; list1) { # NOTE: the delimiter is a SEMICOLON ;  | ||
    doSomething(elem);  | |||
}  | |||
</syntaxhighlight>  | </syntaxhighlight>  | ||
| Line 92: | Line 94: | ||
<syntaxhighlight lang="nasal">  | <syntaxhighlight lang="nasal">  | ||
foreach (light; lights) { lightNodes[light] = propertyPath; }  | foreach (light; lights) {  | ||
    lightNodes[light] = propertyPath;  | |||
}  | |||
</syntaxhighlight>  | </syntaxhighlight>  | ||
edits