LIST Verb - Write Specified Program Lines


LIST {(channelno{,ERR=lineref}{,IND=index})}{linerefA}{{,}{linerefB}}


The LIST verb writes the lines of a program that resides in the user workspace to a given channel.




Valid channel. If no channel is specified, output goes to channel 0.


Branch to be taken if an error occurs during execution.


Starting position within the output file, provided such an option is meaningful for that type of file. The options can be given in any order


First line in the program to be listed.


Last line in the program to be listed.

The LIST verb produces a series of lines with a maximum of 79 characters (including the linefeed character). If a listed line requires more than 79 characters, PRO/5 writes continuation records for that line. Each continuation record begins with the line number, followed by a colon, followed by more of the listing.

LIST can send lines:

  • To any character-oriented device, such as a display terminal.

  • To any record-oriented device with a buffer of at least 79 characters, such as a line printer, or INDEXED, STRING, or SERIAL files.

The following examples show different forms of the LIST verb:

LIST Syntax



All lines in a program.

LIST 100

Line 100.

LIST 100,

Line 100 and all following lines.

LIST ,200

Lines from the start of the program through line 200.

LIST 100,200

All lines from 100 through 200, including lines 100 and 200.


All lines starting at label "MAIN" and all following lines.

PRO/5 acknowledges escapes during LIST.

LIST with pause

When LISTing to a terminal on channel 0, the output may be paginated. After displaying a screen of output, PRO/5 pauses until a key is pressed and then continues with the next screen of output. This may be disabled through the SETOPTS verb. See SETOPTS for additional information.


In console mode, a shortened form of the verb may be used where the verb is represented by a forward slash:

/{linerefA} {,} {linerefB}


1000 LIST (2,IND=24,ERR=9500)1000,5000

See Also

Verbs - Alphabetical Listing