CAlive will introduce the
!() syntax to negate logic tests for formal commands
if and
while. This is the equivalent of doing a logic test and then branching on the opposite condition.
// Traditional code, test the logic and negates the entire expression within the logic test
if (!(a == b && c == d))
// Code here
// With the negating logic operator, you can code the original logic and invert it outside the logic test
if !(a == b && c == d)
// Code here
Note: This is a sweeping negation. It will invert the entire result of the logic test.
--
Rick C. Hodgin