[fpc-pascal] Stupid question: is this safe?
Jonas Maebe
jonas.maebe at elis.ugent.be
Fri Jan 29 12:42:04 CET 2010
On 29 Jan 2010, at 12:39, Bart wrote:
> var
> W: Word;
> U: UInt64;
>
> {$R-} //range checkin off
>
> begin
> U := $0000000100000000;
> W := U; // or W := Word(U);
> end.
>
> I know that the value that i assigned to W is "wrong" (and I can
> handle that), but does it trash memory or cause other serious
> problems?
The only problem that can occur is a range check run time error in
case range checking is enabled.
Jonas
More information about the fpc-pascal
mailing list