[Coco] Tokenized Basic

Johann Klasek johann+coco at klasek.at
Wed Mar 15 12:29:58 EDT 2017


On Wed, Mar 15, 2017 at 08:23:47AM -0600, William Astle wrote:
[..]
> ': this is an alternative to "REM" but is not actually a short cut. It 
> has different semantics. It is shorter to type, yes. But it also does 
> not require a ":" before it if it appears at the end of a line while 
> "REM" does. As a side note, using "'" at the start of a line actually 
> takes up more program space than "REM" because "'" actually stores an 
> invisible colon before its token (which is different than the token for 
> REM).

Aha, same trick as for ELSE (with a hidden ":").

> The tokens stored in memory all have bit 7 set (they're in the range of 
> 128 to 255). There is no way to type those in Color Basic. You can't 
> even include them in an "ASCII" basic program file. The "line input" 
> routine masks off bit 7 on all input.

Oh yes, this is a surprising effect on Commodore's Basic variants
if someone switches to lowercase/upcase character-set and writes
a REM text with uppercase characters. Their coding lays in the token range
(>=128) and might expand with LIST to function or command names,
respectively.
Workaround: start your comment following REM with character " ...



More information about the Coco mailing list