a := 5/0;
The expression 5/0
is, in technical language terms, a constant expression.
A constant expression is an expression that the compiler can evaluate without executing the program in which it occurs. Constant expressions include numerals; character strings; true constants; values of enumerated types; the special constants True, False, and nil; and expressions built exclusively from these elements with operators, typecasts, and set constructors.
As such this expression is evaluated by the compiler, and not at runtime. So its evaluation is determined by compile time rules and cannot be influenced by runtime floating point unit exception masks.
And those rules state that positive value divided by zero is equal to +INF
, a special IEEE754 value. If you change the expression to have at least one argument that is not a constant expression then it will be evaluated at runtime, and a divide by zero exception will be raised.