Q(uick)BASIC Keyword: OFF

Quick View

OFF Keyword

Different Uses

Worth knowing

Useful and cross-version information about the programming environments of QBasic and QuickBasic.

Description/Parameter(s)

Turns off the display of function key assignments when used with the KEY (Assignment) statement, or disables event trapping when used with the event OFF statements (COM OFF, KEY OFF, PEN OFF, PLAY OFF, STRIG OFF, and TIMER OFF).

Description/Parameter(s)
The OFF keyword is used in various statements to disable trapping of the following events:
COM(n) OFF events on communications port n
KEY(n) OFF a keypress event on key n
PEN OFF lightpen events
PLAY OFF background music buffer events
STRIG(n) OFF events on joystick trigger n
TIMER OFF timer events
UEVENT OFF user-defined events
The OFF keyword is also used to turn off the display of soft-key assignments on the bottom line of the screen: KEY OFF
Description/Parameter(s)
  • OFF is used in various statements to disable trapping of events:
    Disables a trapType of event
    COM(n%) OFFEvents on communications port n%.
    KEY(n%) OFFA keypress event on key n%.
    PEN OFFLightpen events.
    PLAY OFFBackground music queue events.
    SIGNAL OFFOS/2 signal events.
    STRIG(n%) OFFEvents on joystick trigger n%.
    TIMER OFFTimer events.
    UEVENT OFFUser-defined events.
  • KEY OFF is used to turn off the display of soft-key assignments on the bottom line of the screen.