Skip to content

IOLIST

Input/Output Variable List

This directive is used to define a list of variable names which can be referenced by an IOL= option in I/O directives. This is normally used to define a record layout once in a program and save each I/O directive from fully defining it at each use.

IOLIST [@(column[, row])] [, mnemonic [, mnemonic...]]
[, output] [, variable-list] [, variable-list [:masking]]
[, IOL=line-ref]
column[,
row] are integers that indicate the horizontal and vertical positioning of the cursor up to the maximum number of columns and rows available on this terminal; both numbers are zero-based (upper left corner of the screen is 0,0).
mnemonic
is a 2-character code, bounded by apostrophes, which indicate a special procedure to be performed on the terminal or device (e.g., 'LF' for Line Feed, 'CS' for Clear Screen, etc.). For more information on mnemonics, please refer to the information in the Thoroughbred Basic Customization and Tuning Guide.
output
is a numeric or string constant or expression (but not a single variable) to be output to the terminal or device, before accepting input (e.g., a prompting message).
variable-list
is a list of numeric or string variables that are to receive or supply values; asterisk (*) is a special case, which ignores the data in that field position.
:masking
is any string to be used as the mask for formatting the output of numeric values.
IOL=line-ref
specifies a program line number or label containing an IOLIST that defines a variable list to either receive multiple INPUT fields or supply multiple OUTPUT fields. If both variable-list and IOL=line-ref are used, the variable-list is used first, followed by the variables named in the IOLIST directive at line-ref.

Note: All syntax components above can appear in logical sequences other than the one shown here.

The IOLIST may be used to define variable lists, mnemonic device control, string text output, output masking, cursor positioning, and other IOLISTs.

The IOLIST is referred to within the I/O directives by using the IOL= option to specify the program line number or label at which the desired IOLIST is located.

Restrictions:

  • Cursor positioning may not be used with the READ, EXTRACT, and FIND directives.
  • IOLISTs may not be used with a RECORD-modified directive.
  • Masking may be used for the output directives PRINT and WRITE only.

See the information on masking output in Volume I for the options available with the :masking clause.

Numeric and string arrays must use the ALL option when the array is referenced as a unit and data in the array may change.

IOLIST X1, Y2$, Z3

defines a variable list for the input or output of data that may be referenced by an I/O directive using the IOL= option.

IOLIST X1, IOL=00200

defines an IOLIST with the variable X1 and the contents of the IOLIST located at program line number or label 00200.

IOLIST @(2,4), "ENTER ID", 'RB', X$

defines an IOLIST for an INPUT directive that includes cursor positioning at column 2, row 4 (@(2,4)), string output (“ENTER ID”), followed by a bell (‘RB’) and the variable-list (X$).

EXTRACT, FIND, INPUT, PRINT, READ, and WRITE directives

From the Thoroughbred Basic Language Reference, Volume II: F–Q, version 8.9.1. Open this page in the PDF