Next: Defining Words, Previous: Memory, Up: Words [Contents][Index]
Control structures in Forth cannot be used interpretively, only in a colon definition11. We do not like this limitation, but have not seen a satisfying way around it yet, although many schemes have been proposed.
| • Selection: | IF ... ELSE ... ENDIF | |
| • Simple Loops: | BEGIN ... | |
| • Counted Loops: | DO | |
| • BEGIN loops with multiple exits: | ||
| • General control structures with CASE: | ||
| • Arbitrary control structures: | ||
| • Calls and returns: | ||
| • Exception Handling: |
To be precise, they have no interpretation semantics (see Interpretation and Compilation Semantics).