Submissions by Harley tagged excercises

Trying to work on some Forth, I've basically read through Starting Forth, but didn't do the examples. For tonight, I decided to pick an example and give it a go.

I ended up with:

VARIABLE i
: N-MAX
    0 i !
     BEGIN
        50 i +!
        i @ 0 <=
    UNTIL

    BEGIN
        i @ 1 - i !
        i @ 0>=
    UNTIL

    i @ .
;

I wasn't too disappointed with this solution. As I was attempting it, I realized +1 wasn't as fast as I had hoped. To compensate I over count, and then count back. The solution they give is here: http://www.forth.com/starting-forth/sf7/7-1.forth

Pay attention to the comments about the note. With that in mind I realized I overly complicated it with a variable (force of habit with every other programming languages.) I was able to very quickly iterate their solution to include the second loop after over counting in the first. Overall, not a bad night.