Toggle
Source: Positron16 Compiler User Manual, PDF page 211
Syntax
Toggle Port.Bit or Variable
Overview
Reverses a variable or pin or a variable. If a Port's pin is chosen as the operand, it will first be set to output mode. i.e. Changing 0 to 1 and 1 to 0.
Parameters
Port.Bit can be any valid Port and Bit combination. Variable {.Bit} can be any valid variable or bit.
Example
PinHigh PORTB.0
' Set bit-0 of PORTB high
Toggle PORTB.0
' And now reverse the bit
Toggle Var1.0
' Reverse bit-0 of Var1
Toggle Var1
' Reverse the whole of Var1