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


BEGIN Search:

In Flow Control Words in TurboForth Kernal

Word Name: BEGIN
Type: Immediate word
Data Stack Signature: --
Return Stack Signature: --
Availability: V1.0  V1.1  V1.2
Description:

Marks the beginning of a BEGIN...WHILE...REPEAT loop or a BEGIN...UNTIL loop.

Example:

: PRESS-S ( -- )
  CR ." PRESS S"
  BEGIN
    KEY ASCII S = NOT IF
      CR ." I SAID PRESS S!"
      FALSE
    ELSE
      TRUE
    THEN
  UNTIL
  CR ." THANK YOU!" CR
;

 

Comment:

none

See Also: REPEAT  UNTIL  WHILE 

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