ProvideX V8.20 > Language Reference > 2. Directives
175
LIST Directive
            List Program Statements
Formats
1. List a Range of Lines: LIST [EDIT] [(chan,fileopt)][from_stmt][,[to_stmt]]
2. List a Range of Lines: / [EDIT] [(chan,fileopt)][from_stmt][,[to_stmt]]
Where:
/ or \
Use either of the slashes (forward or back) as a substitute for typing
LIST. ProvideX also accepts LSIT (i.e., mis-typed version).
EDIT
Use the optional keyword EDIT with the LIST directive to have
ProvideX both logically break the lines and indent them. Refer to the
'LE' System Parameter, p.669, for more information.
chan
Channel or logical file number to receive the readable listing of the
contents of a program.
Supported file options (see also, File Options, p.808):
fileopt
END=stmtref End-Of-File transfer
ERR=stmtref Error transfer
IND=num Record index
TBL=stmtref Data translation table.
from_stmt Starting statement to list. Optional. If you omit this, the default is to
LIST from the start of the program.
to_stmt
Ending statement to list. Optional. If you omit this, the default is to
LIST to the end of the program.
stmtref
Program line number or label to transfer control to.
Description
The LIST directive converts program statements from the internal (compiled) format
to a readable listing that can be sent to a file or to the screen. This directive gives you
a listing of the contents of a program's statements as they were entered into the
system originally. That is, it will return a series of directives, variables, and
operators, with line numbers.
The listing will not necessarily match exactly the way in which a statement was
entered in the first place, but will be syntactically the same. For instance, if you
entered 510 A$="Example" and then used the LIST directive, ProvideX would
return 0510 LET A$="Example".
If you use the LIST directive with no file number or options, the output will be
displayed on your screen. You can direct the output of the LIST directive to any serial
or indexed file or to a device (e.g., a printer or terminal). For more information, see
File Handling in the ProvideX User's Guide.
If the output of a list command goes to your terminal, the listing stops to allow you
to read the program page by page. To continue the listing, simply hit the Enter key.
To stop the listing, use the F4 key. All other input is discarded.