Proposal for version numbering in filenames

Anything QL Software or Programming Related.
Post Reply
User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Proposal for version numbering in filenames

Post by ql_freak »

I have had been a member of SQLUC (Sinclair QL User Club [Germany]). They have had a large library of programs written by members (similar as QUANTA). They have had a nice scheme for version numbers in filenames. I want to make a proposal for ONLY NEW programs to use this version numbering ONLY IN filenames:

Example Program: "DoWhatIAmThinking_exe", Version number: V 1.0.4

The filename for this program in SQLUC would have been:

DoWhatIAmThinking1v0v4_exe

That's easy (everyone should understand it). More complicated MyProg1_bas V1.0.4. That's not so easy, cause the program name ends with a number. We MUST NOT USE an underscore to separate the version number (MyProg1_1v0v4_bas) because than it will be more difficult to decide if MyProg1 is a directory or part of a filename (of course we could use the fullstop '.', but then all filenames with version numbers must be quoted). My suggestion:

MyProg-1v0v4_bas

Of course this has the drawback, that you MUST quote the filename (ONLY if it ends in a number), e.g. COPY 'MyProg1-1v0v4_bas', 'AnotherProg1-1v0v4_bas'. But I think this may be acceptable.

Rules: An underscore ('_') is always a directory separator, except for the last underscore, in which case you must test if the part up to the last underscore is a directory or not. If not the last part (with the underscore) is a file. A (sub)directory name MUST NEVER have an underscore inside(!). => A filename can have at most EXACTLY one (1) underscore. I. e. filenames like "my_super_program_bas" are NOT allowed, instead use the minus sign. Or is there another none alphanumeric character in S(uper)BASIC which is not trapped by the interpreter(?).

If we could rely on this convention – "AND IT IS JUST A CONVENTION!" – this could ease some tasks a lot.

BTW: For my backup disks (which I want to be able to operate on them automatically), I use the convention to add _XXX as the suffix to all filenames, which don't have a suffix (like e.g. _exe); e.g. cc will be backuped as cc_XXX.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
Post Reply