A floating-point constant is a representation of a numerical constant,
shown as an optional sign followed by one or more digits and a decimal point,
which may be at the end.
This representation consists of:
- A significand sign: The significand sign may be + or -. The significand
sign is optional; it is assumed to be + if no sign is specified.
- A significand: The significand must contain a decimal point. The maximum
number of digits that can be specified for the significand is 253; however,
only the first 17 significant digits are used.
- An exponent character: The exponent character must be E.
- An exponent sign: The exponent sign must be + or -. The significand sign
is optional; it is assumed to be + if no sign is specified.
- An exponent: The exponent must be an integer; numbers 0 through 9 are
valid. The maximum number of digits that can be specified is three.
All floating-point constants are stored as double-precision values.
No blanks are allowed between any of the parts of a floating-point constant,
and the parts must be in the order listed above.
Some commands have
parameters for which floating-point constants can be specified:
- Call Program (CALL) or Call Procedure (CALLPRC) command:
You can use the PARM parameter to pass a floating-point constant to a called
program. Any program you call must receive a floating-point constant as a
double precision value.
- Change Program Variable (CHGPGMVAR) command: You can
use the VALUE parameter to change a floating-point variable in a program.
- Copy File (CPYF) command: You can use floating-point construction in the
FROMKEY, TOKEY, and INCREL parameters to select which records are copied from
a database file.