First page Back Continue Last page Overview Graphics

Forth Language

Branching:
IF ... THEN
IF ... ELSE ... THEN
CASE ... OF ... ENDOF ... ENDCASE


Examples:


: even? ( n -- )
    2 MOD 0= IF ." YES" ELSE ." NO" THEN ;

5 even?
8 even?