STRIG (statements) - QB64 Wiki

STRIG (statements)

From QB64 Wiki

Jump to: navigation, search

STRIG statements can be used to enable, disable or suspend event trapping of STRIG return values.


Syntax:

ON STRIG(button) {GOTO|GOSUB} {linenumber | linelabel}


STRIG(button) ON
STRIG(button) OFF
STRIG(button) STOP


Description:

  • Button values range from 0 to 7. See the STRIG function for details.
  • Use button values 0, 2, 4 or 6 to monitor presses that might have been missed due to progam code delays.
  • STRIG(button) ON statement enables joystick button event trapping by an ON STRIG (button) statement. While trapping is enabled, and if a nonzero line number is used in the ON STRIG statement, BASIC checks between every statement to see if the joystick button was pressed.
  • The STRIG(button) STOP statement suspends event trapping, but if an event occurs it is remembered and the event trap will take place as soon as trapping is re-enabled by STRIG(button) ON.
  • The STRIG(button) OFF statement disables event trapping. If a button event occurs (if the button is pressed), it will be ignored when the next STRIG(button) ON is executed.


See also:



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page