On 14 Jan 2010, at 16:30, Jichao Yang <[email protected]> wrote:
int64Val := 2147483648; { 2^32 }
intVal := int64Val; { does not trigger any warnings }
Assigning a longint to a byte does not generate a warning either. This
is simply how Pascal works. If you want compile-time checks for such
operations, use a language such as Ada instead.
Now the intVal should be 0 which is not what I wanted
Enable range checking, and you will get a run time error.
Jonas
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal