Informix Error -4085
-4085 Cannot output expression of this type.
The statement attempted to output an expression of a type that cannot be output, such as FOREIGN, or an expression that includes an invocation of a function that returns VOID.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4085 fires when a statement tries to output an expression of a type that can't be
output — per the official guidance, this includes FOREIGN values or an expression involving
a function call that returns VOID.
- An output statement targeting a
FOREIGN-typed expression, per the official guidance — the first named case. - An output expression that includes a call to a
VOID-returning function, per the official guidance — the second named case.
Solutions / Resolution
- Output a value of a supported type instead, converting or restructuring the expression as needed.
Examples
Outputting a VOID function's result
DISPLAY logEvent("started")
-- -4085: logEvent() returns VOID, which cannot be output
Corrected
CALL logEvent("started")
Diagnostic Checks
- Check the type of every expression being output, and confirm it isn't
FOREIGNor the result of aVOIDfunction call.
Related Errors / Related Topics
- -4078 — "Operand is missing, or is of a type that is not supported." A related unsupported-type error, about general operator operands rather than output statements specifically.
An output statement targets a FOREIGN value or a VOID function's result, neither of which
can be output — use a supported type instead.