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


IF Search:

In Flow Control Words in TurboForth Kernal

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

Executes the words following IF if flag evaluates to TRUE. Starts an IF...ELSE...THEN clause.

Example:

: ODD/EVEN ( n -- ) CR 1 AND IF ." ODD" ELSE ." EVEN" THEN CR ;

Comment:

none

See Also: ELSE  THEN 

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