DEFINE


 

The DEFINE compiler directive allows a label that is substituted for a string of one or more characters. The instruction uses one of the following formats:

 

(1)

label

DEFINE

{string1}

(2)

label

DEFINE

"{string2}"

 

Where:

label

Required. A Data Definition Label.

string1

Required. A string of characters of any value except the space characters that is inserted in the program in place of the label.

string2

Required. A string of characters of any value that is inserted in the program in place of the label.

Flags Affected: NONE

Note the following:

  1. [label] is required for the DEFINE statement.

  2. {string} in format (1) may be composed of any character other than a space.

  3. "{string}" in format (2) is composed of all characters between the quotes. This format must be used if embedded spaces are required in the string. This format may be continued on multiple lines by terminating the string with a ": character pair and then on the next line starting a new string with quotes.

  4. The data in {string} is substituted for [label] whenever [label] is found in the source file during compilation. The substitution may occur in the opcode or the operand fields.

  5. A DEFINE may be nested, in that a DEFINE may reference other DEFINEs.

 

 

See Also: Example Code, UNDEFINE, REDEFINE, Compiler Directives

 



PL/B Language Reference CONST DEFINED