Re: Forbidden variables in BASIC

Alex Evans via Coco <[email protected]> Fri, 15 May 2026 21:24:39 -0400
Newsgroups gmane.comp.hardware.tandy.coco
Message-ID <CAD7WSBT=cMHvqqCDUO1PR=MdiKJcd2gALzjYo9CmN0erMv0FFg@mail.gmail.com>
--===============1424680488193131472==
Content-Type: multipart/alternative; boundary="0000000000002634660651e5322d"

--0000000000002634660651e5322d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

of course if you use longer variable names you start collating with even
more tokens.

On Fri, May 15, 2026 at 7:39=E2=80=AFAM John Mark Mobley via Coco <
[email protected]> wrote:

> 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=3D1
> TH=3D1
> THE=3D1
> THEN=3D1:REM ERROR
> THEN1=3D1:REM ERROR
>
> REM EXAMPLE
> TH=3D1
> THE=3D2
> PRINT TH:REM IT WILL PRINT 2
>
> -John Mark Mobley
>
> On Thu, May 14, 2026 at 5:12=E2=80=AFPM Allen Huffman via Coco <
> [email protected]> wrote:
>
>> > On May 14, 2026, at 4:50=E2=80=AFPM, 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 =E2=
=80=9CAS=E2=80=9D
>> and other tokens in the .BAS file.
>>
>> Also, Juan Castro, I think, pointed out you can just use a space:
>>
>> 10 T O=3D42
>> 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
>

--0000000000002634660651e5322d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">of course if you use longer variable names you start colla=
ting=C2=A0with even more tokens.</div><br><div class=3D"gmail_quote gmail_q=
uote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, May 15, 2026 =
at 7:39=E2=80=AFAM John Mark Mobley via Coco &lt;<a href=3D"mailto:coco@lis=
tserv.adelphi.edu">[email protected]</a>&gt; wrote:<br></div><block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1=
px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>ALL,</div=
><div><br></div><div>With variable names, only the first two letters (or a =
letter and a number) are significant. But you can add more letters for read=
ability=C2=A0and self-documenting code.</div><div><br></div><div>T=3D1</div=
>TH=3D1<div>THE=3D1</div><div>THEN=3D1:REM ERROR</div><div>THEN1=3D1:REM ER=
ROR</div><div><br></div><div>REM EXAMPLE</div><div>TH=3D1</div><div>THE=3D2=
</div><div>PRINT TH:REM IT WILL PRINT 2</div><div><br></div><div>-John Mark=
 Mobley</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D=
"gmail_attr">On Thu, May 14, 2026 at 5:12=E2=80=AFPM Allen Huffman via Coco=
 &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">coco@li=
stserv.adelphi.edu</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote=
" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);=
padding-left:1ex">&gt; On May 14, 2026, at 4:50=E2=80=AFPM, Alex Evans via =
Coco &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">coc=
[email protected]</a>&gt; wrote:<br>
&gt; <br>
&gt; The trouble is caused by the tokenizer. If you create an already token=
ized file by some other means, you can actually use these variable names.<b=
r>
<br>
Hey, does your CoCo script allow this? I realize it could just build =E2=80=
=9CAS=E2=80=9D and other tokens in the .BAS file.<br>
<br>
Also, Juan Castro, I think, pointed out you can just use a space:<br>
<br>
10 T O=3D42<br>
20 PRINT T O<br>
<br>
-- <br>
Coco mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Coco@listser=
v.adelphi.edu</a><br>
<a href=3D"http://listserv.adelphi.edu/cgi-bin/mailman/listinfo/coco" rel=
=3D"noreferrer" target=3D"_blank">http://listserv.adelphi.edu/cgi-bin/mailm=
an/listinfo/coco</a><br>
</blockquote></div>
-- <br>
Coco mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Coco@listser=
v.adelphi.edu</a><br>
<a href=3D"http://listserv.adelphi.edu/cgi-bin/mailman/listinfo/coco" rel=
=3D"noreferrer" target=3D"_blank">http://listserv.adelphi.edu/cgi-bin/mailm=
an/listinfo/coco</a><br>
</blockquote></div>

--0000000000002634660651e5322d--

--===============1424680488193131472==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1424680488193131472==--