SA0122: Array index defined as expressionPermalink

Detects the use of expressions in the declaration of array indexes

Justification: Not all systems permit expressions as array limits.

Importance: Low

Example

PROGRAM PLC_PRG
VAR CONSTANT
 c_iValue : INT := INT#15;
END_VAR
VAR
 arr: ARRAY[0..c_iValue + 1] OF INT;
END_VAR

--> SA0122: Only constants allowed for array definition 'arr'