Hi All, I noticed a strange behavior with the following program:
program tt; {$mode objfpc}{$H+} uses sysutils; var res: Integer; mask1, mask2: QWord; begin mask1 := $FFFFFFFFFFFFFFFF shr 24; WriteLn(IntToHex(mask1, 16)); res := 24; mask2 := $FFFFFFFFFFFFFFFF shr res; WriteLn(IntToHex(mask2, 16)); end. The output is: 000000FFFFFFFFFF 00000000000000FF Why they are different? How can I ensure the result is like SHR with constant. Thanks!
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal