Informix Error -4403: The number of dimensions for the variable variable-name does not match the number of subscripts.
Cause and resolution
The number of dimensions for the variable variable-name does not match the number of subscripts.
In this statement, the array whose name is shown is subscripted by a different number of dimensions than it was defined to have. Check the punctuation of the subscript. If it is as you intended, then review the DEFINE statement where variable-name is defined.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4403 fires when an array reference uses a different number of subscripts than the array's
declared dimensions — per the official guidance, check the subscript's punctuation, and if
it's as intended, review the array's DEFINE statement.
- A subscript count that doesn't match the array's declared dimension count, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the punctuation of the subscript, per the official guidance.
- Review the
DEFINEstatement where the array is declared, per the official guidance, and match the subscript count to it.
Examples
A subscript count mismatch
DEFINE grid ARRAY[10,10] OF INTEGER
LET x = grid[1]
-- -4403: grid is 2-dimensional, but only one subscript was given
Corrected
LET x = grid[1,1]
Diagnostic Checks
- Check the array's
DEFINEstatement for its dimension count, and match every reference's subscript count to it.
Related Errors / Related Topics
- -4321 — "An array may have the maximum of three dimensions." A related array-dimension error, about the overall dimension limit rather than a specific reference's subscript count.
An array reference's subscript count doesn't match its declared dimension count — check the
DEFINE statement and correct the reference.