Informix Error -8004: Illegal FLOAT constant.
Cause and resolution
Illegal FLOAT constant.
The FLOAT constant is not written correctly. The exponent might be too small or too large (the allowable range of exponents depends on your computer and operating system but is the same as your C compiler allows for the DOUBLE data type), or incorrect punctuation or a nondigit character other than e might be present.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8004 fires when a FLOAT constant in a report specification isn't written correctly — per
the official guidance.
- An exponent too small or too large for the system's
DOUBLE-equivalent range, per the official guidance — the first named cause. - Incorrect punctuation, per the official guidance — the second named cause.
- A non-digit character other than
e, per the official guidance — the third named cause.
Solutions / Resolution
- Correct the
FLOATconstant's format, per the official guidance, checking the exponent range, punctuation, and character set.
Examples
An illegal FLOAT constant
LET x = 1.5x10
-- -8004: "x" is not a valid exponent character (use "e")
Corrected
LET x = 1.5e10
Diagnostic Checks
- Check every
FLOATconstant's format, for exponent range, punctuation, and disallowed non-digit characters other thane.
Related Errors / Related Topics
- -8003 — "A SMALLINTEGER constant may not be larger than 32767." A related
constant-format error, for
SMALLINTrather thanFLOATconstants.
A FLOAT constant is malformed — check its exponent, punctuation, and character set.