This is the documentation for ETH Oberon System 3 which uses the same portable OP2 Oberon-2 compiler that is the basis for the Blackbox Component Pascal compiler so it is unsurprising that the behaviour is the same. I haven't found a similar explanation in the Blackbox documentation but it may be somewhere there.How ASSERT statements are treated by the compiler
The compiler evaluates the boolean expression of ASSERT statements with the
following outcome:
- if an expression is TRUE, the ASSERT is treated as dead code
- if an expression is FALSE, an error message (99) is logged
- if an expression cannot be evaluated at compile time, the ASSERT
statement is included as a run-time check
Interestingly, a later version of the Oberon Language (Oberon-07) eliminated the HALT statement altogether and promotes the use of ASSERT(FALSE) instead so there is no redundancy and no ambiguity.