Informix Error -4100
-4100 Illegal definition of constant identifier "name".
A name already established as that of a constant identifier has appeared as a declaration for a new identifier. Suppose, for example, that maxval has already been declared to be a constant in class x, and then a later declaration of VARIABLE x::maxval INT occurs.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4100 fires when a name already established as a constant identifier is redeclared as a
different kind of identifier — per the official guidance, for example, if maxval is already
a constant in class x, a later VARIABLE x::maxval INT declaration conflicts with it.
- A name already declared
CONSTANTbeing redeclared as a variable (or other kind), per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the conflicting redeclaration, or rename one of the two identifiers.
Examples
Redeclaring a constant as a variable
CLASS x
CONSTANT maxval = 100
END CLASS
...
VARIABLE x::maxval INT
-- -4100: maxval is already a constant in class x
Corrected
CLASS x
CONSTANT maxval = 100
END CLASS
Diagnostic Checks
- Check whether the identifier is already declared as a constant elsewhere, and remove or rename the conflicting redeclaration.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4100 in this set yet.
An identifier already declared as a constant is redeclared as a different kind — remove or rename the conflicting declaration.