Re: BASIC ROLL command?
Posted: Fri Oct 27, 2023 12:16 am
Yeah, here's another tidbit for you. The 80-character line length limitation is from the screen editor, not the BASIC parser. Lots of people have built long lines by using 'abbreviations.'
Perhaps you're familiar with the use of '?' to represent PRINT... or, if you're familiar with TRS-80 BASIC, the use of the apostrophe (') to represent REM.
What you may not know about is that many other BASIC keywords have abbreviations in CBM BASIC as well. The trick is to find the fewest non-ambiguous characters that identify a BASIC keyword, and hold down Shift while typing the last letter.
For example, DATA can be abbreviated as D♠ (in upper/lower PETSCII mode, this will look like dA). And since technically, the PRINT# keyword is a different command, you can't use ?# for it, but you can use P followed by Shift-R, and this abbreviates the entire thing; you don't even need the # sign. You get a six-character keyword for only two characters entered.
The practical limitation for a BASIC line length is 250 entities (whether characters in literals or keyword tokens). I don't know if BASLOAD checks for that maximum. But yeah, it should work as long as you stay at or under that maximum, though as you've noted, you're going to have trouble editing that once it's been tokenized.
Perhaps you're familiar with the use of '?' to represent PRINT... or, if you're familiar with TRS-80 BASIC, the use of the apostrophe (') to represent REM.
What you may not know about is that many other BASIC keywords have abbreviations in CBM BASIC as well. The trick is to find the fewest non-ambiguous characters that identify a BASIC keyword, and hold down Shift while typing the last letter.
For example, DATA can be abbreviated as D♠ (in upper/lower PETSCII mode, this will look like dA). And since technically, the PRINT# keyword is a different command, you can't use ?# for it, but you can use P followed by Shift-R, and this abbreviates the entire thing; you don't even need the # sign. You get a six-character keyword for only two characters entered.
The practical limitation for a BASIC line length is 250 entities (whether characters in literals or keyword tokens). I don't know if BASLOAD checks for that maximum. But yeah, it should work as long as you stay at or under that maximum, though as you've noted, you're going to have trouble editing that once it's been tokenized.