The 'lognot' function returns the logical bitwise inversion of the expression.
(lognot 255) ; returns -256 (lognot #xffff0000) ; returns 65535 (lognot #x00000000) ; returns -1 (lognot 1) ; returns -2 (logand (lognot 256) 65535) ; returns 65279 (lognot #xFFFFFFFE) ; returns 1 (lognot #xFFFFFFFC) ; returns 3
Note: XLISP does not check when read-macro expansions like '#x0FF' are out of bounds. It gives no error message and will just truncate the number to the low-order bits that it can deal with [usually 32 bits or 8 hex digits].
See the
lognot
function in the