Here come the traumatic memories of doing If/Then/Goto on TI-Basic, not understanding the Else or End tokens at all. Turns out each If/Then opens a new stack frame, and because I was never closing them with the corresponding tokens, memory slowly filled while the program ran. You could therefore get a high score of exactly 203 on my PONG clone before it crashed.
Good times! But seriously, take a few minutes to learn your tools properly if you use them more than once, it'll make things so much easier. :)
Re:Stamping the joy out of collectors
by devenblake on Saturday April 17, 2021 @08:16PM
(#26848642)
Ah, I remember this!
Lbl A
If 1=1
Then
Goto A
Will always crash after a couple seconds. Used to show it to my friends sometimes as a gag but it sucked to have to work around it.
(TI-BASIC uses = for equality comparison (iirc this includes comparing strings(?)) and -> as a single arrow symbol (STO on the keypad) for variable assignment (5->A for example is the same as A = 5 in Python).)
Well, technically... you are correct.
It would still be an improvement over the older BASIC dialects, because with those it was common to have a limit to the number of variables due to names being one or two letters.
Yep. ZX81 BASIC had 26 string variables (A$ through Z$) and 26 floating point variables (A through Z). No integer variables per se, but you could POKE and PEEK to get at 8-bit values anywhere in memory - which typically maxed out at 16K.
Once you've mastered if/else and goto, what else do ya need?