EXTEND
ANSI, NCHAR
The EXTEND instruction increments the Form Pointer of a character string variable by the value of the second operand. The extended area is overwritten with spaces and the Length Pointer is set to the value of the new Form Pointer. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
dest
Required. A previously defined Character String Variable or National Character String Variable that is modified.
sep
Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.
count
Required. A previously defined Numeric Variable, Expression, or decimal constant indicating the number of character positions the variable is extended.
Flags Affected: EOS
Note the following:
If {count} is not specified, the Form Pointer is incremented by a value of one (1).
If {count} is specified, the Form Pointer of {dest} is incremented by the value of the second operand. The extended area is blank filled and the Length Pointer is set to the new Form Pointer.
Only the integer portion of {count} is used (i.e., 1 if 1.89).
If the new Form Pointer exceeds the Physical Length of {dest}, the EOS Condition Flag is set and the extension terminates at the Physical Length.
Enhanced ARRAY processing is supported.
See Also: Example Code, Character String Instructions
![]() |