Tandy 1000 Basic Reference Manual page 322

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter
10 I
BASIC Keywords
6
Tests to see if Trigger B2 has been pressed and re-
leased since the last STRIG(6) function was executed.
BASIC returns a -1 if it has been pressed and a 0 if
not.
Tests to see if you are currently pressing Trigger B2.
BASIC returns a -1 if you are pressing
it
and a 0 if
not.
7
Joystick A is the left joystick and Joystick B is the right joystick.
You must execute a STRIG
ON
statement before you can execute
a STRIG function. If you attempt to execute a STRIG function
before you execute a STRIG ON, BASIC issues an "Illegal func-
tion call" error. See STRIG/Trap.
You cannot place a STRIG function in a subroutine that you
branch to as a result of a n
ON
STRIGO GOSUB statement.
BASIC does not keep track of which button was pressed after the
ON
STRIG() GOSUB statement is executed.
If
you wish to trap
both buttons and perform a different procedure for each button,
you must execute a STRIGiTrap for each button, and you must
branch to different subroutines with different
ON
STRIGO GO-
SUB statements.
Sample Program
This program tells BASIC to beep whenever the trigger on Joys-
tick A is pressed.
1 0
S T R I G
ON
20
IF STRIG(0)
THEN
BEEP
30 G O T 0 20
320

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents