The values of individual integer variables smaller than SLONG are held in memory as SLONG values. Therefore overflow does not occur for integer types until an overflow of the SLONG data type occurs. Array elements, on the other hand, are always held as their specified data type.
Range checking is not performed when values are assigned to array elements because the overhead is considerable and in most cases the nature of the program avoids truncation or overflow. In cases where assigning an integer variable to an array might result in undesired truncation, apply a type conversion intrinsic to the result before assigning to the array.
The conversion intrinsics range check their arguments and cause overflow errors if the value is out of range for the specified result type. For example, the following two lines assign an expression value to SSHORT array k without range checking, then with range checking:
k%[n] = a * b + c * d ' no range checking
k%[n] = SSHORT (a * b + c * d) ' do range checking