On Sat, Jan 27, 2018 at 10:06 AM, Adriaan van Os <f...@microbizz.nl> wrote: > > > The code shouldn't generate a range check error, as the target type is > signed. >
Count returns Unsigned Qword. unsigned $FFFFFFFFFFFFFFFF is beyond 32-bit boundary. The similar issue, but more explicit. {$R+} function Count: qword; begin Result := 0; end; var i: Integer; K : Qword; begin K:=count-1; writeln(K); I:=k; // <-- rangecheck error writeln(i); end. thanks, Dmitry
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal