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


CASE Search:

In Flow Control Words in TurboForth Kernal

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

Marks the beginning of case-by-case processing.

Example:

: TEST ( -- )
  KEY CASE
    32 OF ." SPACE " ENDOF
    42 OF ." STAR " ENDOF
    13 OF ." ENTER " ENDOF
    ." UNKNOWN CASE"
  ENDCASE ;

: TEST-CASE ( -- )
  BEGIN TEST BREAK? AGAIN ;

TEST-CASE

Comment:

none

See Also: ENDCASE  ENDOF  OF 

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