Gerhard Scholz wrote:
<snip>
It seems that the compiler now sees a "ord(c)" to be a BYTE, and BYTE - BYTE
shall give a BYTE, and -1 is not in the range allowed for a BYTE.
Thanks for taking a look at this. I am reasonably sure that this
beheviour is wrong, (otherwise you could never take the difference
between unsigned values) but I was concerned that as it was flagged
unreproducable on the bug tracker I had messed up my compilation of fpc
in some way. As it seems I havn't, perhaps I should re-submit it.
The line " i := Ord('0')-Ord('1') " in the main program is not interesting,
since it contains a constant expression and is converted to " i := -1 " by
the compiler.
... though this should have given a compile time range check error
because the types are the same
Colin
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel