[Coco] WHAT MANNER OF UNHOLY WIZARDRY IS THIS?

Arthur Flexser flexser at fiu.edu
Mon Apr 21 22:51:17 EDT 2014


I think there are some very rare circumstances where putting the drive
number at the beginning may offer some slight advantage in programming.  If
the filename exists in the program as a string variable, the drive number
in prefix format will always be in character position one;  in suffix
format, the drive number's position within the string depends on the length
of the file's name.

Art


On Sun, Apr 20, 2014 at 10:52 PM, William Astle <lost at l-w.ca> wrote:

> On 14-04-20 06:44 PM, Arthur Flexser wrote:
>
>> Bill, putting the drive number before rather than after the filename has
>> always been a legal alternate syntax in Disk Basic.
>>
>
> Huh. Who knew. It's the first I've ever heard of it, too. But I just
> looked at the code in the original DECB ROM and sure enough, it
> specifically checks for that case. However, the check only works for a
> single digit drive number and the number can only be 0, 1, 2, or 3.
>
> HDBDOS does eliminate that particular "feature". The existing code
> couldn't possibly work with drive numbers more than one digit long and
> given that the prefix drive number syntax is not documented anywhere
> official, it was a prime candidate as somewhere to clobber for including a
> patch for something else.
>
> I suspect this one is possibly a holdover from other systems that used a
> prefix drive letter or something like that.
>
> There are a few other interesting variations accepted by DECB, too, so
> this isn't particularly surprising. For instance, the manual says to use
> "D" for a random file but "R" is also accepted. One can also prefix
> coordinates for various graphics commands with @. You can also include
> random text after the line number on a GOTO or GOSUB without provoking a
> syntax error. You can also leave out the THEN keyword on an IF statement if
> the command you want to run is GOTO or GOSUB.
>
>



More information about the Coco mailing list