Informix Error -2958: You may have a maximum of ten parameters in a C-function.
Cause and resolution
You may have a maximum of ten parameters in a C-function.
This improper call to an external C function has too many parameters. Find some way to pass the same information in fewer parameters.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2958 fires when a call to an external C function in the form specification passes more than ten parameters — per the official guidance, this is a hard limit on the form compiler's handling of C-function calls.
- A C-function call with more than ten parameters, per the official guidance — the direct, only cause.
Solutions / Resolution
- Find some way to pass the same information in fewer parameters, per the official guidance — for example, by packing related values into a single structured parameter on the C side.
Examples
Too many parameters
INSTRUCTIONS
AFTER FIELD item_code
CALL cfunc(a, b, c, d, e, f, g, h, i, j, k)
END
-- -2958: 11 parameters exceeds the limit of 10
END
Corrected
INSTRUCTIONS
AFTER FIELD item_code
CALL cfunc(a, b, c, d, e, f, g, h, i, j)
END
END
Diagnostic Checks
- Count the parameters in every C-function call in the form specification, and reduce any that exceed ten.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -2958 in this set yet.
A C-function call passes more than ten parameters — the form compiler enforces a hard limit of ten.