Conditional and Looping: for

Use for to implement a conditional loop.


(for (code block 1) (conditional expression) (code block 3)
    code block 2

code block 1 is executed once. while conditional expression evaluates to be TRUE (non zero), code block 2 and then code block 3 is executed.

Example using the for statement - prints "." on the screen 20 times
(for (= i 0) (< i 20) (++i)
  Display("." dsCOLOR clLIME)

See Also: do while, while, break