AT&T 6300 Programmer's Manual page 373

Gwbasic by microsoft
Hide thumbs Also See for 6300:
Table of Contents

Advertisement

Syntax
n
line
Remarks
ON STRIG
(n)
Statement
Sets up a line number for BASIC to trap to
when one of the joystick buttons (triggers) is
pressed.
ON STRIG
(n)
GOSUB
line
may be 0. 2, 4, or 6, and indicates the button to be trapped
as follows:
°
button Al
2 button Bl
4 button A2
6 button B2
is the line number of the trapping routine. If line is 0,
trapping of the joystick button is disabled.
The ON STRIG(n) statement causes a
program to branch to a specified routine when
a specific joystick button is pressed. A
STRIG(n) ON statement must first be executed
in order for an ON STRIG (n) statement to be
active.
The trap routine passes control back in one of
two ways. RETURN branches to the program
line at which the interrupt was detected.
RETURN n branches· to line n.
To avoid recursive traps a STRIG(n) STOP is
automatically executed when the trap occurs.
A RETURN from the trap routine
automatically performs a STRIG(n) ON
(unless a STRIG(n) OFF was performed within
the trap routine). The RETURN line form may
also be used.
7-217

Advertisement

Table of Contents
loading

Table of Contents