Content deleted Content added
m →Technical details: C128s BASIC 7 also had two-byte tokens. |
|||
Line 17:
In the default [[graphic mode]], shifted characters appear as a graphics symbol; e.g. the command, <code>GOTO</code>, could be abbreviated <code>G{Shift-O}</code> (which resembled <code>G'''Γ'''</code> onscreen). Most such commands were two letters long, but in some cases they were longer. In cases like this, there was an ambiguity, so more unshifted letters of the command were needed, such as <code>GO{Shift-S}</code> (<code>GO♥</code>) being required for <code>[[GOSUB]]</code>. Some commands had no abbreviated form, either due to brevity or ambiguity with other commands. For example, the command, <code>INPUT</code> had no abbreviation because its spelling collided with the separate <code>INPUT#</code> keyword, which was located nearer to the beginning of the keyword [[lookup table]].
By abbreviating keywords, it was possible to view more code than would otherwise be possible on a single line (line lengths were usually limited to 2 or 4 screen lines, depending on the specific machine). This allowed for a slight saving on the overhead to store otherwise necessary extra program lines, but nothing more. All BASIC commands were tokenized and took up 1 byte (or two, in the case of several commands of BASIC 7 or BASIC 10) in memory no matter which way they were entered.
In the rare situation when commercial BASIC software was meant to be <code>LIST</code>-ed, each token's keyword was spelled out in full, leading to a line that extended over more screen lines than could be handled by the [[Logical Line Link Table]]. If programmers intended editing of their software by users, the user might nevertheless have found it daunting to edit with the on-screen editing capabilities. <code>LIST</code>ing these long lines on the Commodore 64 near the bottom of the screen could trigger a bug in the 40 column screen editor, causing the machine to crash or return an OUT OF MEMORY error.
|