Previous Topic Next topic Print topic


Input Conversion

For F-Format input conversion, a field of w characters from the input line is converted to a fixed-point decimal value of precision (p,q). If the field contains a decimal point, q is the number of digits following the decimal point; otherwise, q is the value of d or is zero if d is omitted. If the field contains all blanks, the result value is zero, and p is the value of MIN(n,w) where n is the maximum precision allowed by the implementation for fixed-point decimal data. (For the maximum precision allowed by Open PL/I, see your Open PL/I User's Guide.) If the field does not consist entirely of blanks, it must contain an optionally signed fixed-point constant with optional leading and/or trailing blanks. In that case, p is the precision of the constant. If an invalid field is read, the Compiler signals ERROR.

Field Result Precision
boxe     0 (5,1)
-700boxes -70.0 (3,1)
boxes0 0 (1,0)
25.6boxes 25 (2,0)
boxes5E+1 invalid    
Previous Topic Next topic Print topic