>I am using the bittest function and getting a function, argument, type, or count is invalid. The code is bittest(bitmask,196608).
>
>What's wrong?
>
>Jim
Bittest() just tests a certain bit in the expression you pass and returns .T. if it is a 1 and .F. if it is a 0.
8 in binary is 100
? bittest(8,3) && returns .T.
? bittest(8,2) && returns .F.
The value 196608 is beyond the range of Bittest(). Maybe you want something like BitAnd(). It can be used to determine if a mask exists within a number.
? bitand(32,48) && returns 32
This means bitwise speaking that 32 is included in the make up of 48.
32 = 10000
48 = 11000
Ex.
if bitand(mask,196608) = mask then
else
endif
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao