Informix Error -4024: Identifier "name" has multiple declarations with different types.
Cause and resolution
Identifier "name" has multiple declarations with different types.
Multiple declarations of a given name in a given scope must be consistent (that is, they must have the same type). The identifier that is shown has been declared with a different type.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4024 fires when the same identifier is declared more than once in a scope with inconsistent types — per the official guidance, multiple declarations of a name in a given scope must all agree on type.
- The same identifier declared with different types in the same scope, per the official guidance — the direct, only cause.
Solutions / Resolution
- Make the declarations consistent, per the official guidance, either by using the same type everywhere or renaming one of the conflicting declarations.
Examples
Conflicting redeclaration
DEFINE total DECIMAL
...
DEFINE total INTEGER
-- -4024: total was already declared DECIMAL
Corrected
DEFINE total DECIMAL
Diagnostic Checks
- Check every declaration of the named identifier within the scope, and make sure they all agree on type.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4024 in this set yet.
An identifier is declared more than once with inconsistent types — make the declarations consistent.