APPEND


ANSI, NCHAR

 

The APPEND instruction appends the source string to the destination string. The instruction uses the following format:

 

 

[label]

APPEND

{source}{sep}{dest}

 

Where:

label

Optional. A Program Execution Label.

source

Required. A previously defined Character String Variable, National Character String Variable, Literal, National Character String Literal, or Numeric Variable that is appended to the {dest} variable.

sep

Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.

dest

Required. A previously defined Character String Variable or National Character String Variable to which the {source} operand is appended.

Flags Affected: EOS

Note the following:

  1. The source is appended to {dest} immediately after the Form Pointed character. The Form Pointer and Length Pointer both point to the last character appended. If the Physical Length of {dest} is exhausted before the APPEND is complete, the EOS Condition Flag is set.

  2. If {source} is a character string variable, only the Logical String contents are appended.

  3. If {source} is a numeric variable, the entire Physical String is appended.

  4. The {source} remains unchanged.

  5. Enhanced ARRAY processing is supported for the APPEND instruction.

  6. The National Character String Variables can ONLY contain valid UTF-8 characters. Otherwise, a F14 error occurs.

 

 

See Also: Example Code, PACK, PACKKEY, REMOVE, Character String Instructions

 



PL/B Language Reference AND BUMP