Go to the first, previous, next, last section, table of contents.


while

Control-struct: while
file: job.t
package: muf
status: alpha

The while operator is traditional in Forth, and is equivalent to not if loopFinish fi. It may be used anywhere in a loop:

Stack:
10 seq[
Stack: [ 0 1 2 3 4 5 6 7 8 9 |
do{   |pop -> x   x |push   x 5 != while   |rotate   }
Stack: [ 6 7 8 9 0 1 2 3 4 5 |

See section until. For more on loopFinish, see section do.


Go to the first, previous, next, last section, table of contents.