Start Back Next End
  
ZBasic System Library
226
ZBasic Microcontrollers
PinToggle
Type
Subroutine
Invocation
PinToggle(pin)
Parameter
Method
Type
Description
pin
ByVal
integral
A pin number (value must be known at compile time).
Discussion
This subroutine changes the state of an output pin to the opposite of its current state.  If the value of the
pin parameter is not known at compile time (e.g. a constant) a compile error will result.  If the pin has not
been previously configured to be an output, the effect of invoking PinToggle on that pin is undefined
(varies by target device).
The advantage of using this subroutine instead of using PutPin() to achieve the same result is that the call
to this subroutine results in much smaller/faster code.  The disadvantage is that the pin number must be
known at compile time.
Compatibility
This subroutine is only available for native mode devices (ZX or generic target devices) and is not
available in BasicX compatibility mode.
See Also
Previous page Top Next page