Saturday, 10 October 2009
36 or 40?
What is the maximum length of a file name under QDOS or smsq/e? The official answer is 36 characters. I discovered that QLiberator had this embedded in it this afternoon when I tried to link into a compiled program a file with a filename of more than 36 character. When I reduced the length of the file name to 36 character it compiled file. Wait a minute I had a legal file on disk with a name length of more than 36 characters!! This file could be viewed, edited, copied and moved etc with the QPAC2 files thing! Earlier I was trying to get the length of a few files using the TK2 FLEN function, and guess what, it balked at file names of more than 36 characters although these were seen as legitimate file names by the file thing of QPAC2. Confusing it is but it seems in some circumstances that 40 characters is OK. This gives a file name of 36 characters plus 4 for the primary device : Win1_ or flp1_. But these device names are 5 characters not 4 due to the underscore. That makes the maximum file name length leaving aside the primary device 35 characters not 36. Tell me if this is so. If it is yet another QDOS secret uncovered.