.LIST

Control the listing of source code

WSupported on Windows
USupported on Unix
VSupported on OpenVMS

 

.LIST

The .LIST compilation control directive, together with the .NOLIST and .START directives, control the listing of source code.

The .LIST directive increments a listing counter, which has an initial value of zero. Listing is enabled only if the counter is greater than or equal to zero and listing has been enabled at the command line. A .LIST line that turns listing on won’t appear in the listing.

If listing is not enabled at the command line, the compiler ignores all .LIST directives. See Building and Running Synergy Applications for more information on how to enable listing at the command line.

The following example assumes that listing has been enabled at the command line and that the listing counter is currently zero.

.nolist                ;The listing counter will be decremented.
.include "file"        ;No statements from this include file will be listed.
.list                  ;The listing counter will be incremented, thus listing 
                       ; will be enabled again and the rest of the source lines 
                       ; will be written to the listing file.
proc
    .
    .
    .
end

In this example, if a second .NOLIST exists in the .INCLUDEd file, the listing counter is decremented to -2. Since the .LIST following the .INCLUDE statement only increments the counter to -1, listing remains disabled throughout the file.