Re: Forbidden variables in BASIC

John Mark Mobley via Coco <[email protected]> Fri, 15 May 2026 06:39:13 -0500
Newsgroups gmane.comp.hardware.tandy.coco
Message-ID <CAM_JOUhM-dhVym8zgtb4Z40UzkfpT9itmVZTpnRz9rPgg8G3Hg@mail.gmail.com>
ALL,

With variable names, only the first two letters (or a letter and a number)
are significant. But you can add more letters for readability and
self-documenting code.

T=1
TH=1
THE=1
THEN=1:REM ERROR
THEN1=1:REM ERROR

REM EXAMPLE
TH=1
THE=2
PRINT TH:REM IT WILL PRINT 2

-John Mark Mobley

On Thu, May 14, 2026 at 5:12 PM Allen Huffman via Coco <
[email protected]> wrote:

> > On May 14, 2026, at 4:50 PM, Alex Evans via Coco <
> [email protected]> wrote:
> >
> > The trouble is caused by the tokenizer. If you create an already
> tokenized file by some other means, you can actually use these variable
> names.
>
> Hey, does your CoCo script allow this? I realize it could just build “AS”
> and other tokens in the .BAS file.
>
> Also, Juan Castro, I think, pointed out you can just use a space:
>
> 10 T O=42
> 20 PRINT T O
>
> --
> Coco mailing list
> [email protected]
> http://listserv.adelphi.edu/cgi-bin/mailman/listinfo/coco
>

-- 
Coco mailing list
[email protected]
http://listserv.adelphi.edu/cgi-bin/mailman/listinfo/coco