Restored from previous forum. Originally posted by michaelj.
Okay, I gotta respond to this ;o)
You should try to be consistent at least. One way or the other. Here's both ways, with both values:
Code: Select all
; Simple bitwise test.
var.l = 4293844428
lo1 = var & 65535
hi1 = var >> 16
lo2 = PeekW(@var)
hi2 = PeekW(@var+2)
MessageRequester("Number test - Original = "+Hex(var), "hi="+Hex(hi1)+", lo1="+Hex(lo1)+", hi2="+Hex(hi2)+", lo2="+Hex(lo2), 0)
End
There seems to be a bug with Hex() in that, no matter how I run it, lo2 & hi2 will always display a full long value. lo1 and hi1 work as expected *UNLESS* I specify them with type (ie, lo1.w, hi1.w) in which case they exhibit the same behaviour. That's one for Fred I think !
(And we could really do with line continuation ability !!)
Hope this helps.
Michael.
(Registered PureBasic user)
Edited by - michaelj on 07 February 2002 20:38:52