<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>


LOOP Search:

In Flow Control Words in TurboForth Kernal

Word Name: LOOP
Type: Immediate compiling word
Data Stack Signature: --
Return Stack Signature: ret_add max index --ret_add index | --
Availability: V1.0  V1.1  V1.2
Description:

Causes a DO/LOOP to repeat from the word immediately following DO.

Example:

: TEST ( -- ) 100 0 DO I . LOOP ;

Comment:

When the loop index, accessible via I is equal to max (see DO) the loop terminates and execution continues with the word immediatley following DO)

See Also: +LOOP  DO  LEAVE 

<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>