Loops

repeat


repeat
looping-statement
until boolean-expression


The NewtonScript repeat loop is very similar to repeat loops in other languages:

e := q:Entry();
repeat
   :Foo();
   e := q:Next();
until e = nil;
The repeat loop evaluates its boolean expression at the bottom of the loop. If the expression is nil, it jumps back up to the repeat. If the expression is non-nil, it skips to the next statement. The looping statement is always executed at least once.


An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996