Directives
LIST 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, for more information.
chan Channel or logical file number to receive the readable listing of the contents of a program.
fileopt Supported file options (see also, File Options):
END=stmtref End-Of-File transfer (File full)
ERR=stmtref Error transfer
IND=num Record index
TBL=stmtref Data translation table
stmtref Program line number or statement label to which to transfer control.
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 statement label to which to transfer control.
Description The LIST directive converts program statements from the internal (compiled) format to a readable listing which 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.

If the listing of a statement exceeds the maximum allowed length of a record for a given file (e.g., 80 for terminals), the statement will be broken into multiple segments
(records/lines). The first n characters (where n is the maximum segment length) will be contained in the first segment with each subsequent n characters up to the end of the statement sent in subsequent segments. Each continuation segment will be prefixed by the line number followed by a colon ":" and a space.

   
Coloured Syntax Displays If the 'CS' system parameter is on, your listing will be displayed with a different colour for each syntax element. For more information, refer to the 'CS' System Parameter and the '*H' Mnemonic. There is a command line utility called COLOUR (or COLOR) that can be used to display or alter the current settings. Type COLOUR or COLOR at a ProvideX prompt to display online help for this utility.
   
Highlighted Search Strings If search has been implemented for the currently-loaded program, and the 'LM' parameter is on, the system will automatically highlight the search string when the program is listed. For a description of the search utility syntax, refer to Punctuation/Syntax.
   
Examples Given a file with twenty character records,

0020 PRINT "The quick brown fox licked the dog"

becomes

0020 PRINT "The quic
0020: k brown fox li
0020: cked the dog"
 

    LIST Directive Result:
   
    LIST 30 Lists line 0030
   
    / 30 Also lists line 0030
   
    LIST 30,100 Lists lines 0030 to 0100
    LIST 30,
    Lists lines from 0030 to the end of the program LIST,WRAP_UP
Lists entire program
   
    LIST (1) Lists entire program to logical file #(1), which can be a file/device (e.g., a printer).