Informix Error -4321: An array may have the maximum of three dimensions.
Cause and resolution
An array may have the maximum of three dimensions.
You have written more than three subscripts following the name of an array. However, 4GL only supports arrays of three dimensions or fewer. Check the syntax of the subscript; an extra comma might have been entered in error.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4321 fires when more than three subscripts follow an array name — per the official guidance, 4GL only supports arrays of three dimensions or fewer.
- An array reference with more than three subscripts, per the official guidance — the direct, only cause; possibly from an extra comma entered by mistake.
Solutions / Resolution
- Check the subscript syntax for an extra comma, per the official guidance.
- Reduce the array to three dimensions or fewer if more were genuinely intended.
Examples
An array reference with too many subscripts
DEFINE grid ARRAY[10,10,10] OF INTEGER
LET x = grid[1,2,3,4]
-- -4321: four subscripts exceeds the maximum of three
Corrected
LET x = grid[1,2,3]
Diagnostic Checks
- Count the subscripts in every array reference, and confirm it's three or fewer.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4321 in this set yet.
An array reference uses more than three subscripts — check for an extra comma, or reduce to three dimensions.