re-Formatting a given Rexx source code

The reFormat.rex program is a fast conversion from the REXREF3.rex code for Personal REXX for DOS by Stephen Ferg to Object Rexx for Windows. It has been tested only on a few Classic Rexx files.

Use with care. Operate on a clean tested code controlled first by your Rexx interpreter. Control and retest the re-formatted file. It works on small standard Rexx files as it is, it may not work on other files.

The in-line comments (prefixed by '--' as in Object-Rexx and NetRexx) are not supported. You can use the reCMT.rex to convert to standard Rexx comments (/* */) if any -- are not embedded in any literal string.


reFormat is a REXX program that takes a REXX source-code file and:

In reformatting the code, it:

About the program

All of the above files should be put in the same directory. You can either put that directory in your path, or make that directory your current directory when running reFormat. The source code file to be processed does not have to be in this directory, but when you pass its name to reFormat, its name must be qualified enough for reFormat to find it. The user has to set the two variables ResourceDir and WorkDir within the reFormat.rex code.

And of course the executables for the sort program must be placed in a directory that DOS can find when the sort is invoked. Copy LSRTNT.EXE to the \Windows\System32 directory for example.

There is also a test input file called TESTXREF.REX

Running reFormat

About the configuration file

The configuration file, reFMT_cfg.txt contains REXX assignment statements that initialize certain key variables in the reFormat program. If the configuration file does not exist, or does not set values for those variables, defaults are used. Values are not case-sensitive. This file can be edited with any ordinary text editor.

The variables that specify the case formatting take values of

For the 'R' indicator: you can use an ordinary text editor to customize the case of the keywords and function names in reFMT_kwd.txt and reFMT_fct.txt to suit your own taste.

News group

Thanks to those that have contributed to make this conversion (newsgroup: comp.lang.rexx). Report there for comments, questions etc.