Nesting Levels and Indenting

The TPFDF SPMs indicate the nesting level by using assembler messages.

The following is an example of how these messages indicate the nesting level:

+*,1   cccccccccccccccccccc code
       .
+*,2   cccccccccccccccccccc code
       .
+*,3   cccccccccccccccccccc code
       .
+*,2   cccccccccccccccccccc code
       .
+*,1   cccccccccccccccccccc code
Note:
You can suppress the generation of these nesting level assembler messages with the #SPM macro. See #SPM-Assembly Output Processing for more information.

The nesting level begins at 0 and is incremented by 1 after any of the following macros:

The nesting level is decremented by 1 after any of the following ending macros:

Consider indenting the assembler messages or the code itself to reflect the nesting levels of the program logic.

You can represent the nesting level by indenting the number produced in the assembler message, but not the code itself, as follows:

1      cccccccccccccccccccc code
       .
 2     cccccccccccccccccccc code
       .
  3    cccccccccccccccccccc code
       .
 2     cccccccccccccccccccc code
       .
1      cccccccccccccccccccc code

Using this method requires you to postprocess the assembler messages that are generated.

Note:
The postprocessing is installation-dependent and is not supplied with the TPFDF product or the TPF system.

You can also represent the nesting level by indenting the code itself. If you do this, use the following guidelines: