NAME
Flip — Change value to zero if it is one and vice versa.
SYNOPSIS
Flip TargetVariable
DESCRIPTION
Return Value
1 If input was zero.
0 If input was one.
Arguments
TargetVariableWhat to flip. Can be either a value or @VarName (will upvar and read/write).
More Info
Note that the variable must already have a zero or one to begin with.

Note that arguments of the form XxxVariable can take either a normal value or the name of a variable to read/write, prefixed by @. See About Using @ for details.


For information regarding exceptions / errors, see here.
EXAMPLES
% Flip 0
1
% Flip 1
0
% set MyVar 0
0
% Flip @MyVar
1
% puts $MyVar
1
SEE ALSO
Decr, incr
KEYWORDS
conversion, math, transform