This program (NatLabel) is a Windows GUI application for converting
numeric referbacks (line number references) in Natural source code
to statement labels.
It operates on plain text downloaded source code files where each
line contains a 4-digit sequence number, a space, then the source
statement. I have contemplated getting it to operate on files in
SYSTRANS format, but am not sure either of the wisdom or the utility
of this idea. I'd welcome any input from users re this question.
As far as I'm aware, it will deal with all possible formats for
referbacks - eg. (1230), ( 1230), (1230/5), (1230/#I) - but please
let me know if I'm mistaken.


Bug reports, suggestions for improvement, questions, etc are
all very welcome and can be sent to me, Adrian Carter, at

Adrianbc@bigpond.com 



The other files included here
--------------------------------
NatLabel.exe is the executable.
NatLabel.hlp is the help file.
MyTemplates.Txt is an example of a set of conversion templates.
Old.Txt is a sample of some Natural source code. Don't attempt to run it.
New.Txt contains the result of running NatLabel against Old.Txt
using MyTemplates.Txt, and selecting the Templates|Apply menu item.


For operating instructions, execute the help file as a standalone.


Bug fixes and enhancements.
------------------------------
March 30, 2002
1. Program was failing to detect a pre-existing label if it sat
   on the line above the labelled statement, and was not followed
   by a "/*" comment. This meant that referbacks could be replaced
   by a label which already existed, thus invalidating the Natural
   source code.  Bug fixed.

2. Because the program was designed to process referbacks in
   portions of code that have been commented out, it had to also
   detect pre-existing labels on such lines. However if a line of
   internal program documentation ended with a period, the last word
   was being "detected" as a label. The search for pre-existing
   labels now starts only after the END-DEFINE statement, so the
   impact of this feature is reduced. However, it can still happen.
   The practical effect is to prohibit a word from being used as a
   label, if it occurs as the last word in a paragraph of internal
   documentation after END-DEFINE, and is the only word on its line.

3. Added "File | Clear" menu item (does not operate if file has been
   autoloaded, only if file loaded via "Load" button).

4. Added "Actions | List Labels" menu item to display a messagebox
   containing a list of all labels in the loaded source, both those
   built within the program and those that pre-existed.



December 7, 2003
5. The use of a default conversion template set, combined with the
   correct INI file option, allows a source file passed as a command
   line parameter to be processed immediately without waiting for an
   action from the user. However, by design it would then wait for
   the user to explictly save the result. A new INI file option 
   (AUTOMATICSAVE=YES) forces the source file passed via command line
   to be overwritten with the converted source code, after which the
   program will exit. This new facility allows the automatic conversion
   of a large number of source code files, by embedding a series of
   NatLabel invocations within a BAT file or other Windows scripting
   language.
   For example, a BAT file could contain the following entries:


   natlabel.exe C:\temp\source1.txt
   natlabel.exe C:\temp\source2.txt
   natlabel.exe C:\temp\source3.txt
   natlabel.exe C:\temp\source4.txt

   With this example, NatLabel would be run 4 times and the code within
   each of source1.txt - source4.txt would contain labels converted from
   referbacks according to the rules within the default template file.