SFORMAT


ANSI

 

The SFORMAT instruction adjusts the physical length of a character string variable. The instruction uses the following format:

 

 

[label]

SFORMAT

{dest}{sep}{size}

 

Where:

label

Optional. A Program Execution Label.

dest

Required. A previously defined Character String Variable whose Physical Length is modified.

sep

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

size

Required. A previously defined Numeric Variable, Expression, or decimal constant indicating the {dest} variable’s new Physical Length.

Flags Affected: OVER

Note the following:

  1. {dest} is the character string variable adjusted.

  2. The second operand specifies the new Physical Length of the adjusted variable.

  3. {dest} is blank filled and set to a Null String.

  4. If the specified length is zero, negative or greater than the originally compiled Physical Length of the variable, the OVER Condition Flag is set and the variable remains unchanged.

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

 

 

See Also: Example Code, NFORMAT, Character String Instructions

 



PL/B Language Reference SETLPTR SINSERT