<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>
In Flow Control Words in TurboForth Kernal
Begins a DO/LOOP or a DO/+LOOP sequence.
: TEST ( -- ) 100 0 DO I . LOOP ;
The loop begins counting at start. The loop repeats when the word LOOP or +LOOP is encountered. The loop repeats from the word following DO. Each iteration through the loop increases the index value (accessible with the word I). When the index value is equal to max the loop terminates. The word LEAVE may be used to conditionally exit the loop early.