[Coco] Valid file names for Disk BASIC
William Astle
lost at l-w.ca
Thu Apr 7 12:36:24 EDT 2016
On 2016-04-07 10:26, tim lindner wrote:
> On Thu, Apr 7, 2016 at 9:17 AM, William Astle <lost at l-w.ca> wrote:
>> 2. If the provided name is 2 or more characters long *and* the second
>> character is a colon *and* the first character is 0, 1, 2, or 3, then that
>> is interpreted as a drive number and parsing begins after the colon.
>
> Does this imply that 0:, 1:, 2:, 3: are not legal at the beginning of
> a filename?
It would, yes. However, ":" is not valid inside the filename anyway so
files won't have ":" in the name. (The colon always introduces a drive
number or causes an error.)
You *can* reference a file called "0", "1", "2", or "3" with a drive
number if you specify the extension, though. Anything that moves the
colon away from the second position in the string. So "0.:2" would
reference a file called "0" with a blank extension on drive 2 while
"0:2" would reference a file called "2" with the default extension on
drive 0. And "0:2:0" should trigger an error.
More information about the Coco
mailing list