Operands
ANSI
OPERANDs are the PL/B instruction parameters - the parameters required by OPERATION or the data field definition. The general format of operands is as follows:
|
|
|
FIRST is the first OPERAND that may be required by OPERATION. SEPARATOR is required if a second OPERAND is used and may be a comma (,) or a valid PL/B preposition.
SECOND is any additional OPERAND (or OPERANDS) required by OPERATION. If a comma SEPARATOR is used, it cannot be preceded by a space. Otherwise, a valid preposition (BY, TO, OF, FROM, USING, WITH, IN or INTO as appropriate to OPERATION) must be used with at least one preceding and trailing space.
The following are examples of valid PL/B OPERAND syntax:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following are examples of invalid PL/B OPERAND syntax:
|
|
|
|
|
|
|
|
|
|
|
|
OPERATIONs that may have a variable number of operands require a comma as the SEPARATOR. If the list exceeds a single line, a colon (:) is used in place of a valid SEPARATOR to continue the list onto the next line. A double colon (::) continues a literal on another line. A single colon means to terminate the literal but continue the statement. A double colon also continues a statement on another line at a point where a single colon is normally used as a separator between two fields.
The maximum source statement length is 4096.
A valid SEPARATOR example within a DISPLAY OPERATION:
|
|
|
|
|
|
|
|
|
|
|
|
The same SEPARATOR example without using line continuation:
|
|
|
|
|
|
|
|
|
|
|
|
Example of a literal continued on multiple lines using double colons:
|
|
|
|
|
|
|
|
|
|
|
|
Example of a colon separated list control continued on multiple lines:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
An alternate method of line continuation places a colon in the first column of a source line. The remainder of the line is then appended to the previous line.
|
|
|
|
|
|
|
|
|
| ||
See Also: Instruction Syntax
![]() |