[fpc-pascal] shift right operation with variables

waldo kitty wkitty42 at windstream.net
Mon Aug 17 15:47:45 CEST 2015

On 08/16/2015 09:38 PM, Xiangrong Fang wrote:
> The output is:
> 00000000000000FF
> Why they are different? How can I ensure the result is like SHR with constant.

being curious, i tried your program with the same results... then i changed the 
var name from "res" to "foo" with the same results... i thought maybe there was 
some type conversion going on so i changed "foo" from "integer" to "QWord" and 
still got the same results... there appears to be a problem at play...

Free Pascal Compiler version 3.1.1 [2015/06/13] for x86_64

  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list* unless
        private contact is specifically requested and granted.

More information about the fpc-pascal mailing list