NFORMAT
ANSI
The NFORMAT instruction provides a way to adjust the Physical Length and characteristics of a FORM variable. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
dest
Required. A Numeric Variable that is adjusted.
sep
Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.
left
Required. A Numeric Variable, Expression, or decimal constant indicating the number of digits to the left of the decimal point.
right
Required. A Numeric Variable, Expression, or decimal constant indicating the number of digits to the right of the decimal point. If zero is specified, no decimal point is included in the field.
Flags Affected: OVER
Note the following:
Neither the left nor right digit indicators should include the decimal point.
The new length may be less than or equal to the original compiled length. If an attempt is made to extend the variable beyond its compiled length, the OVER Condition Flag is set and the variable remains unchanged.
The value of {dest} is set to zero after the adjustment is made to the size of the field.
Enhanced Array processing is supported.
See Also: Example Code, SFORMAT, Mathematical Instructions
![]() |