>hello everybody.
>
>it seems, in Vfp6 Sp5, that the following works:
>
>?bitand(2^30, 2^30) = 2^30
>but the next one does not
>?bitand(2^31, 2^31) = 2^31
>
>is this the limitation of BitAnd()?
>
>if so, is there a workaround? currently i need to be able to check for values up to 2^33
>
>thanks for all your help in advance!
Definitely a limitation on BITAND and the other bit functions. They can only work on 32 bit numbers, but it seems it won't work on the 32nd bit as that's the sign bit. The help doesn't even mention 32 bits, but I think that's the case.
Some of the bit commands mention bits 0-31 and some don't. Also, I don't think you're using BITAND correctly, it returns the bits that are common to the parameters you pass, not a .T./.F. return value.
?TRANSFORM(BITAND(2^31,2^31),"@0x")
prints a value of 0x80000000, which is correct.