LIST Verb - Write Specified Program Lines

Syntax

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

Description

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

Parameter

Description

channelno

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

ERR=lineref

Branch to be taken if an error occurs during execution.

IND=index

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

linerefA

First line in the program to be listed.

linerefB

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

Lists

LIST

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.

LIST MAIN,

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.

Shortcuts

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

/{linerefA} {,} {linerefB}

Examples

>LIST
1000 LIST (2,IND=24,ERR=9500)1000,5000
>/100,200

See Also

Verbs - Alphabetical Listing