
Instructions for Varifile and Change/var.

I was taught that it was sound practice to keep an annotated list of the variables used in a complex program, but in practice there are snags. First the list must be compiled. This is easy using one of the utilities such as BREF, but then it has to be annotated. This done one finds that the program has to be re-numbered, so the whole job has to be done again I have not anyway yet discovered how to put the output from BREF into a disk file. 
I am convinced of the value of such lists. I have just finished compiling them finally (I hope) for a suite of Accounting programs consisting of a master program and ten overlays. They were originally written about seven years ago, and have just been re-written to do another job. The longer used, one case, fortunately unimportant, where the same variable has different meanings in different parts, and one case where there are two variables with the same meaning! 
There are two problems. The first is to compile a list which can readily be edited, both for minor changes and for the odd addition, and the second is to make changes to the line numbers on renumbering.

The two programs on the disk do this. The first, Varifile, is a much revised version of a Basic program I wrote years ago called Varilist. (There is also a revised version of Varilist). The principal change is that it files the whole thing to an ASCII disk file. It uses a machine-code sort which I got with Micro-Systems Software Inc. Basic enhancemets, so anyone using another Basic will need to rewrite the sort.

To use it, load the program to be listed and merge Varifile with it, then enter 'RUN 60000' and follow the instructions. The program is slow but does the job. Now convert it as required for your word-processor. I thought it would be simple to convert to a Scripsit file using the A command, but I found it didn't work. (For the matter of that it would not convert a Basic program either.) The trouble is that Scripsit does not recognise the end-of-file marker used. The remedy is simple if you have TED. Load TED, load the file and immediately resave it. This (which works with a Basic program too) puts a recognisable end-of-file marker in place .

Once loaded into Scripsit,(or whatever word-processor you use) you need to adjust the margins and tabs. Using 12 chars/in. I set the left margin at 5 (to allow for hole punching), tabs at 18 and 48 and the right margin at 75. You will then find that it aligns itself as below:

A$       /space for description        1000, 1020/2, 1050

Type in the descriptions, paginate and head as required, and print.

Now disaster, you need to renumber! First use Varifile to make a new list from the new version, but do NOT convert it for your word-processor. 
Next make a new copy of the first file under a new name and convert it back to an ASCII file. Remove print instructions and headers (TED will do this easily). Do NOT remove tab signs.

Now call the second program, Change/var, and follow the instructions. The result will be a new ASCII file with the old descriptions and the new line numbers. Any new variables will be listed at the end, whence they can be moved with your word-processor to their correct positions, and any disused ones will have no line numbers and can be edited out. It will be necessary to edit the tabbing in places.

All this sounds long and complex, but it is surprisingly quick to do, especially compared with the alternative of re-entering a new list manually.

README/TXT 23.10.89
 