[fpc-pascal] Range checks

Adriaan van Os fpc at microbizz.nl
Sat Jan 27 16:06:30 CET 2018


C Western wrote:
> The following innocuous looking code generates a range check error:

The code shouldn't generate a range check error, as the target type is signed.

Note that Oberon was designed by Niklaus Wirth specifically to prevent this kind of problems. See 
the notes on type inclusion in section A.4.4 of An introduction to Oberon-2 
<http://www.cs.bath.ac.uk/~claire/Oberon.pdf>

Apple has never heard of type inclusion or even range checking and is arbitrarily mixing signed and 
unsigned types.

Regards,

Adriaan van Os



More information about the fpc-pascal mailing list