blist Command

The blist command formats and outputs BASIC source code listings, according to the options chosen. It can also be used to format a BASIC source program and write it back to the file from which it came.

Syntax

blist file.reference itemlist* {(options}

Parameter(s)

options

b

Expands lines containing only an ! into a line of asterisks.

c

Does not indent comment lines.

d

Double-spaces the listing.

l

Suppresses the editor line number.

n

Does not wait at the end of the page (on screen listings).

p

Outputs to the spooler.

s

Draws vertical structure lines. If the s option is specified, then vertical lines are drawn between the beginning of a structured construct and the end of the construct. This option is useful when constructs span pages or are nested many levels deep.

t

Outputs to the terminal. If a line is too long to fit into the page width (as setup with the term command), an attempt is made to fold the line at spaces, commas, or other delimiters. The folded portion of the line is indented to the same level as the original line. Any control characters encountered display as ellipses.

WARNING—The t option is intended for use when the p option has been included in the default options. The t option overrides the p option and should never be included in the default options (or output to the spooler is impossible).

The D3 version of blist can be customized. The blist command is table driven. The table is stored in the messages file. The item-ID of the control table is bl followed by a four-character hexadecimal number. The table number is contained in line 4 of the command definition. The default table number is 0, thus the default table item-ID is bl0000.

Line one of the control table defines the left margin, number of spaces to indent for each construct, and the default options. Each of these is separated by a comma. The default control table contains 7,3,(bs) on line 1, designating a left margin of 7 (statement label area), 3 spaces to indent for each construct, and the options b and s are used by default.

Line two of the control table defines the keywords used at the beginning of a statement, which may begin or end a construct or which may begin a comment. Each value on this line contains the keyword followed by a subvalue mark, followed by a type character (for example, an asterisk for comment or semicolon for statement), and two digits. The first digit specifies the number of outdents for the statement, the second digit specifies the number of indents for the statement.

NOTE

Some statements may contain a value in each digit (such as while, which outdents the statement containing the while command, and then indents the following statements).

Line three of the control table defines the keywords used at the end of a statement that can begin or end a construct.

See Also

b/list Command, bformat Command, renumber Command