I was looking for examples to test my parser’s ability to deal with code that has no spaces in it. I had earlier noticed that awari was written that way, so I used it. With a couple of tweaks I got it working.
At which point I noticed the game does not work. It’s rather obvious why. At the top of the program, line 5, is a DATA statement that has a single value, 0. The next few lines of code read that number and then construct a for/next for that many iterations.
The idea is to read in the computer’s opening setup. However, no such setup is actually provided. Nor does the article talk about it at all or describe how to make the game work properly, and there’s no REM either. So he published a broken program, which seems to confirm my suspicion that he simply re-printed code sent to him without typing it in from its original printout.
The reason this is at all interesting is because this code would work on a compiled dialect - well it wouldn’t cause an error anyway. This was one of K&K’s “big problems” with most BASICs, that FOR I=1 TO 0 would still perform one loop. On a compiler, it would not, and the code in question would simply exit, but on most dialects, and especially interpreters, it would run through the loop once which would then attempt to READ another DATA element that doesn’t exist.