FILL


NCHAR

 

The FILL instruction stores a character value into every physical position of one or more destination variables. The instruction uses the following format:

 

 

[label]

FILL

{source}{sep}{dest}

 

Where:

label

Optional. A Program Execution Label.

source

Required. A previously defined Character String Variable. National Character String Variable, literal, or National Chacter String Literal from which the fill character is retrieved.

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, National Character String Variable, Numeric Variable, a list of variables, or a VARLIST of variables that is filled with the {source} value.

Flags Affected: NONE

Note the following:

  1. If {source} is a character string variable, the Form Pointed character fills the {dest} variables. If {source} is a literal, the first character fills the {dest} variables. {source} remains unchanged.

  2. The Physical Length of the {dest} variables are filled with the {source} value. The {dest} variables Form Pointers are set to one (1) and their Length Pointers are set to their Physical Length.

  3. If {source} is a Null String variable, no changes are made.

  4. {dest} may be continued on additional lines by terminating each continued line with a colon (:) in place of the comma between the last list item on the continued line and the first list item on the new line.

  5. The FILL instruction ignores any Numeric Variables that are encountered in the {dest} list. The basic operation of the FILL instruction is only meant to manipulate a Character String variable or National Character String variable. The ability to compile a Numeric Variable into a FILL {dest} list was provided for situations where Character String variables, National Character String variables, and Numeric Variables exist in the same RECORD or VARLIST. In this case, the FILL operation is executed for any Character String variables and National Character String variables and any Numeric Variables are ignored.

 

 

See Also: Example Code, CLEAR, Character String Instructions

 



PL/B Language Reference EXTEND FINDCHAR