Some Popular Misconceptions (Mostly about filenames)

See all articles from Sinc-Link v9 n2
Author(s): Howard Clase
Publication: Sinc-Link
Pub Details: Sinc-Link v9 n2 (Volume 9, Issue 2)
Date: March/April 1991
Pages: 22-23

From time to time I read in an article or letter about the QL statements that I know to be untrue or at least misconceived. Sometimes the same misconceptions occur over and over again. The following comments arise from a recent (Jan 90) issue of QL World and the final issue of a US newsletter called Quantum Levels, which started with high hopes as a bimonthly in August 1986 but only managed 12 issues in three years.

Basic Filenames.

Many people seem not to realise that there are two ways of presenting QDOS commands with filenames, and that the rules for allowable characters differ between them. In each case there is a limit of 36 characters in addition to the five which define the device (e.g. mdv2_).

1. The normal method of supplying a “parameter” consisting of unadorned ascii characters when only normal letters, numbers and the underscore character “_” are accepted, e.g. LOAD mdv1_my_prog1.

2. QDOS will also accept strings, otherwise it would be almost impossible to write file handling programs. (I think early versions of the QL only worked this way.) By a string I mean

i. a set of characters in quotes e.g. SAVE “flp1_!@#$”,
ii. a string variable to which a string of characters has been assigned e.g. COPY a$,b$
iii. a string function e.g. MERGE dev$&”_”&pää$&CHR$(233).

In these cases the only restriction is that the first five characters must be a legitimate device name followed by an underscore, the rest can be anything you can type in at the keyboard, and even unprintable characters (use CHR$() as above). Thus you could create files with unprintable names that would be almost impossible to delete without reformating the medium – if there were any point to this! Some commercial programmers have used filenames consisting entirely of spaces, which are invisible in a normal listing – I once discovered one on a disk someone sent me that read “FORMAT flp1_:FORMAT flp2_” that was named ” “; luckily I discovered it using my Ftidy program before it was activated.

As far as I can see these rules apply to all commands that take filenames in the QL ROMs and in Toolkit II, such as RENAME.

FORMAT also works in the same way as far as medium name is concerned; that’s how they got the date in the form ‘ 9985 on the early mdv cartridges.

You can even put one totally nameless file onto each medium; e.g. SAVE flp1_ creates such a file. The file can be BASIC, text or machine code, and is available to any of the commands referring to a single file name. However, DIR, and any commands or programs which make use of the directory, fail to recognise the file at all. If you suspect such a file may be lurking about on one of your disks/cartridges you can reveal it by COPY flp1_,mdv2_secret (or something similar – COPY flp1_,scr_ also works). If a file called “secret” appears on your target device, then it is secret no more and now available to all the normal manipulations.

Psion Filenames.

It is fairly common to read that Quill files must have the extension _doc, export files must have the extension _exp etc., This is not so, these are merely the defaults that the Psion suite uses if provided with nothing else. While you are restricted to a maximum of eight normal letters and numbers for the main part of the name and there must be a thre character extension you can use any three characters that can be obtained from the keyboard for the extension. You must, however, type them all in when you want to save or load the file; “letter_@#$” is quite acceptable as a quill file name for example. You can import any ascii text file into quill too, but it must also fit these rules, so you may have to COPY it to a regulation filename (or rename if you have the facility.) It is the file header itself that distinguishes quill files from abacus files etc. and not the extension as is often thought. I use a three character date code on all my letters e.g. Michael_B12 means a letter to Michael written on November 12th (to me at any rate!)

More Psion tricks

Shift + F5 refreshes the screen in all the programs, but for some reason is undocumented. (Much better than F2 twice!)

Have you discovered that CTRL + down-arrow deletes from the cursor to the end of the line, and CTRL + up-arrow from the cursor to the beginning of the line?

Howard Clase, Tel [phone number omitted]
Box 9947, Station B,
St John’s,
Newfoundland,
CANADA, A1A 4L4.