| > I discovered the pointer to the next line wasn't a good idea, because it needed to move every pointer after a line insertion. Huh? Don't you need to only change the "next-line-pointer" for the line that's right before the inserted line? > but the NEXT changed the line, but on the next statement it would lost track and get back to the line following the NEXT. The loops also require their own stack, but including the counter variable address, a pointer to the TO expression, and a pointer to the STEP expression (5 words in total). Mmm. IIRC, usually the compiled NEXT statement would store the pointer to the corresponding FOR statement, so you don't need an additional stack for loop depth during the execution. But you still need it (or some other sort of chaining) during the program input so whatever. > Typing the program was difficult, as the keyboard bounced a lot. This happens when you read too fast the keyboard, so fast you can see that effectively the key contact isn't perfect. Yeah... I've read that keyboard microcontrollers has to deal with contact bounce even today. |
I think you do. Apart from common sense, nothing forbids one from writing stuff like
I think many basics also allowed changing that goto 100 to goto 200 and adding Yes, things would likely end badly, but the basic interpreter would not be smart enough to reject such programs. Its editor didn’t even guarantee that a for statement had a corresponding next or vice versa; all it guaranteed was that the program consisted of a list of lines that each in isolation are valid basic code.