Sorry I'm a little late into this discussion, but my favorite way of saying logical_XOR(a,b) in C is: a?!b:b Note that the value returned is either zero or non-zero as opposed to zero or 1, so is good only when you want the expression to be evaluated for as zero or non-zero (as in an if or while). Steve Nelson zehntel!zinfandel!steve