[Coco] Re: NT: BASIC educate

Rogelio Perea os9dude at gmail.com
Sun Nov 20 08:54:41 EST 2005


On 11/20/05, Robert Gault wrote:

> Just "looking in all the wrong places". Special Characters are listed in
> the Coco3 Quick Reference Guide,  p25 or the equivalent for the Coco
> 1&2, an accordion fold-out.
>
> Special Characters
> ' abbreviation for REM
> $ makes variable a string type
> &H makes numeric constants hexadecimal (only listed in Coco3 book)
> &O makes numeric constants octal       (only listed in Coco3 book)
> : separates statements on the same line
> ? same as print
> , PRINT punctuation - tab
> ; PRINT punctuation - no space between items

This thread about shortcuts and special characters in Basic brings
back a memory from a prank we played on a very gullible fellow student
b-a-c-k in the early 80s. I haven't tried this in the TRS-80 Model I
Level II Basic, this I know happens in the Model III 'cassette' Basic
(tried it on my CoCo 3 and DECB doesn't seem to like it):

The IF THEN statement sometimes can be constructed without the THEN.
One time we were working on an assignment and in one part a friend of
mine and I did something like:

100 IF A=Y SET(XI,YI)

One of our really annoying fellow students was watching over our
shoulders and pointed out to us (loud voiced so everyone in the lab
would be able to hear) that we had a mistake in our source, the THEN
was missing. In one of those brilliant once-in-a-lifetime moments we
kept a straight face while we told this guy that the TRS-80s had run
through Basic programs for so long now that in many ways they "knew"
what came in 'next'; that sort of settled the matter and we had an
internal chuckle and that was it... so we thought. A couple of weeks
later, on a test, the Basic programming teacher wrote a note on the
guy's paper asking him why was he 'shorthanding' the IF THEN statement
like 'that'; this guy actually had the nerve to, after class end, be
at the teacher's desk giving him the BS explanation we had given him
before. As the credit card commercials go -> that was priceless!.

I seem to recall that the THEN-less construct didn't work with every
type of coding - I will need to fire up my Model IV to try this again
and confirm. The example line above will not work in DECB but
something like:

100 IFA=100 GOTO 150

will. It has been too long :-)



--


-=[ Rogelio ]=-



More information about the Coco mailing list