Re:Donkey – A computer game included with early versions of ...
by webtechgal on Monday July 18, 2016 @09:36AM
(#12114940)
I remember there being a STEP command to set the increment value. However, when I tested it (on the PCJS sim from the top of the thread) just now, its throwing a Syntax Error!! I am nearly sure that was what the command was, but I don't know what gives right now.
[ Parent
| on HN ]
Re:Donkey – A computer game included with early versions of ...
by throwanem on Monday July 18, 2016 @11:21AM
(#12115581)
My BASIC memories are rusty, and more oriented toward Applesoft than Microsoft. But I remember STEP being used to give an optional increment to the FOR statement, rather than setting a line numbering increment - for example, you might
FOR i$ FROM 1 TO 10 STEP 2
PRINT i$
NEXT
and get back 2, 4, 6, 8, 10, each on its own line.I don't remember a command to set the increment for line numbers, but that may be because I never used a BASIC which didn't either require a number on every line or not care about line numbers except as targets for GOTO and similar.