4.4 Loop clauses

If a loop clause is small enough to fit in a single line without occupying most of it, just do it.

If a loop clause spans two lines, and the second line is not too long, you can put od in the same line than do.

If a loop clause spans several lines, please put the do symbol in its own line, indented to the same level than the clause’s frobyts.

Examples:

{ Very short loop-clause in a single line.  }
for a to argc do puts ("arg: " + argv[a]) od;

{ Short loop-clause with `od' in the same line than `do' }
for i from LWB a to UPB a
do total +:= a[i] od

{ A loop-clause that spans several lines }
while NOT exit
do string cmd = get_command;
   process_command(cmd)
od