Im trying to run the following code, and combine 4 or so lines into just 1... any help with what Im doing wrong ? res != res2 for some reason ?
Thanks
Neil
Code: Select all
sub Main()
Dim res as UnsignedInteger
Dim res2 as UnsignedInteger
dim t2 as UnsignedInteger = &H7f
dim t3 as UnsignedInteger = &Hf8
dim tt as UnsignedInteger
t2 = Shl(t2, 8)
t3 = t3 AND &HFF
tt = t2 OR t3
res = Shr(tt , 3)
'~ the above in one line
res2 = Shr(shl(t2,8) OR (t3 AND &HFF) , 3)
Debug.print "t2="; t2;", t3=";t3; ", tt=";tt; ", res=";res;", res2=";res2;
end sub