Tandy 1000 Basic Reference Manual page 240

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter
10
I
BASIC
Keywords
ON STRIG() GOSUB
Statement
ON STRIG(number) GOSUB line
Transfers program control to a subroutine when you press one of
the joystick's buttons.
Number specifies the number of the button pressed and is one of
the following:
0
left joystick, button 1
2
right joystick, button 1
4
left joystick, button 2
6
right joystick, button 2
Line
is the first line number of the subroutine to be executed
when you press one of the joystick's buttons. If you specify Line
0, you turn off trapping for the joysticks. Use RETURN to exit
the subroutine.
BASIC executes the ON STRIGO GOSUB statement only if a
STRIG ON statement has been executed previously to enable
joystick trapping.
If a STRIG STOP statement has been issued to halt joystick
trapping temporarily, BASIC executes the subroutine immedi-
ately after the next STRIG
ON
statement.
When the
ON
STRIGO GOSUB statement is executed, BASIC
immediately issues a STRIG STOP statement to prevent recur-
sive traps. When BASIC executes the RETURN from the subrou-
tine, it automatically executes another STRIG ON statement to
enable joystick button trapping again, unless the subroutine exe-
cutes a STRIG
OFF
statement.
238

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents