? BITXOR(nFlags, 8)>
* nFlags = 8 or 2 IF BITAND(nFlags, 8) # 0 * Clear it nFlags = BITXOR(nFlags, 8) ELSE * Set it nFlags = BITOR(nFlags, 8) ENDIFYou can also use BITTEST() to check if a particular bit is set. In this case, ? BITTEXT(nFlags, 3) (because 8 = 2 ^ 3) will tell you whether or not (.T. or .F.) it's set.