In which I prematurely exit loops The basic DO loop is done. Now we need to implement LEAVE. This is effectively a "go to the end of the loop". It seems simple enough but there is a problem in that LEAVE can occur - in fact, almost certainly will occur - inside other control structures, … Continue reading Go Forth and Leave
Tag: loop
I Do Forth
In which I go loopy trying to implement do loops Do loops are control structures that require a bit more thought than the ones implemented s far. The main problem is the existence of a loop variable, or, in the case of nested do loops, multiple loop variables. We'll deal with that in a minute. … Continue reading I Do Forth