form m_runset

The form m_runset stores the settings for the program beautify_prg.prg into defines.dbf.

FoPro® has a routine beautify to organize indents between certain commnad structures.

Unfrotunately, this routine is not available at runtime, hence we needed to add an own routine beautify_prg.prg

This routine expects the complete program source to beautify as a string and returns all beautified lines as a string. Hence, if you want to use the procedure, read the program you to beautify into a string and rewrite the file with the result.

Since the T&T routine does a bit more than the FoxPro beautify, there are some parameters you can modify.

Firstly decide whether you want TT to beautify each program before each compile, only at a right-click on the gear icon in form m_runprog, or never. (In the latter case, forget all the other settings since they do not come into effect.)

indent columnsdefines by how many columns the source lines will be indented after certain commands. 3 or 4 is a good value.

FoxPro has two kinds of comments:

Any line starting with an asterix ('*') is a comment. Decide whether you want the leading asterix to be indented as the source around.

Any text after two ampersands ('&&') is comment. These commnets can be adjusted to the right of you programs and put the first ampersand into a first column. If the source line is longer, you may define the distance to following columns until a source line width is reached and causes the program to start a new line and position the comment at first column.

If you want, the indenting source commands like do while ... enddo or if ... endif can be changed to upper case to result in DO WHILE ... ENDDO or IF ... ENDIF respectiveley.

Last but not least, empty lines can be removed from the program.

Errors in the source code are marked with a comment (*T&T*). These lines are automatically removed with the next beautify_prg.

NEVER use beautify_prg if you do not have a backup of the program you want to beautify.