-\ CONTROL STRUCTURES ----------------------------------------------------------------------
-\
-\ So far we have defined only very simple definitions. Before we can go further, we really need to
-\ make some control structures, like IF ... THEN and loops. Luckily we can define arbitrary control
-\ structures directly in FORTH.
-\
-\ Please note that the control structures as I have defined them here will only work inside compiled
-\ words. If you try to type in expressions using IF, etc. in immediate mode, then they won't work.
-\ Making these work in immediate mode is left as an exercise for the reader.
-
-\ condition IF true-part THEN rest
-\ -- compiles to: --> condition 0BRANCH OFFSET true-part rest
-\ where OFFSET is the offset of 'rest'
-\ condition IF true-part ELSE false-part THEN
-\ -- compiles to: --> condition 0BRANCH OFFSET true-part BRANCH OFFSET2 false-part rest
-\ where OFFSET if the offset of false-part and OFFSET2 is the offset of rest
-
-\ IF is an IMMEDIATE word which compiles 0BRANCH followed by a dummy offset, and places
-\ the address of the 0BRANCH on the stack. Later when we see THEN, we pop that address
-\ off the stack, calculate the offset, and back-fill the offset.