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


J Search:

In Flow Control Words in TurboForth Kernal

Word Name: J
Type: Standard word
Data Stack Signature: -- index
Return Stack Signature: --
Availability: V1.0  V1.1  V1.2
Description:

Returns the outer index when used in a nested DO or FOR loop.

Example:

: TEST ( -- ) 10 0 DO ." Outer loop " I . CR 5 0 DO ." inner loop " J . LOOP CR LOOP ;

In this example the inner loop accesses the index of the outer loop via the word J.

Comment:

none

See Also: DO  FOR  LOOP  NEXT 

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