Assigning out of range set values

Official Description

6.8.2.2 For an assignment-statement, it is an error if the expression is of a set-type whose value is not assignment-compatible with the type possessed by the variable.

Simplified Description

In other words, it is an error to assign an out-of-range set value to a variable. NOTE: The previous error said "... the variable or function-identifier" but this one just says "... a variable". The reason why "function-identifier" is not meantioned with this error description is that Standard Pascal does not allow set values to be assigned to function identifiers. Irie Pascal does allow set values to be assigned to function identifiers, and if range checking is enabled, does report assigning out-of-range set values to function identifiers.

Error Handling

This error is reported if range checking is enabled.