ON: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
m (Removed protection from "ON")
No edit summary
Line 2: Line 2:




* Set the sub-procedure call for [[KEY(n)]], [[ON COM (n)|COM(n)]], [[PEN]], [[PLAY]], [[STRIG(n)]], [[TIMER]], [[UEVENT]]
* Set the sub-procedure call for [[KEY(n)]], [[ON COM (n)|COM(n)]], [[PLAY]], [[STRIG(n)]], [[TIMER]], [[UEVENT]]


* To turn on event trapping for [[ON COM (n)]], [[ON KEY (n)]], [[ON PEN]], [[ON PLAY (n)]], [[ON STRIG (n)]], [[ON TIMER (n)]] and [[ON UEVENT]].  
* To turn on event trapping for [[ON COM (n)]], [[ON KEY (n)]], [[ON PEN]], [[ON PLAY (n)]], [[ON STRIG (n)]], [[ON TIMER (n)]] and [[ON UEVENT]].  

Revision as of 20:31, 8 August 2022

ON creates event procedure calls or enables event trapping.


  • In the case of ON ERROR the trap is also enabled until a subsequent ON ERROR statement.
  • ON procedures should be used only in the main program module and not inside of SUB procedures!
  • If you have used the $CHECKING:OFF metacommand, $CHECKING:ON will turn on c++ error checking again.


See also:

ON...GOSUB, ON...GOTO

OFF, STOP, KEY

$CHECKING



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link