TOGGLE(<integer-variable>, <bit>) | TOGGLE(<integer-variable>.<bit-number-constant>)
Flip the given bit within <integer-variable>.
or:
TOGGLE(<boolean-variable>)
Flip the given boolean variable.
<integer-variable>:
Any integer variable or SFR.
<boolean-variable>:
Any boolean variable or bit within a variable or SFR.
<bit>:
A bit number constant 0..n applicable to <integer-variable>, or dynamic given by any expression.
VAR
TheBit: BOOLEAN;
TheWord: WORD;
BitPos: BYTE;
…
TOGGLE(TheBit);
TOGGLE(TheWord, BitPos);
…