Chapter
10
I
BASIC
Ke.ywords
STRIG
Stat
emen
t
STRIG
ON
STRIG
OFF
Enables the STRIG function.
STRIG
ON
STRIG
ON
lets you execute STRIG function statements to return
the status of the joystick buttons. If you attempt to execute
a
STRIG function before you execute a STRIG
ON
statement,
BASIC issues an “Illegal function call” error.
STRIG
OFF
If you execute a STRIG OFF statement, you can not execute
STRIG function. Executing
a
STRIG function after a STRIG
OFF statement results in
an
“Illegal function call” error.
When you load BASIC, the default is STRIG OFF and you cannot
execute STRIG/Function statements.
You cannot place a STRIG function in a subroutine that you
branch to as a result of an
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
STRIG/Trap for each button, and you must
branch to different subroutines with different
ON
STRIGO
GO-
SUB statements.
See STRIG Function, STRIG/Trap, and
ON
STRIGO GOSUB for
additional information on joystick trapping.
318