QBasic 1.1: STRIG Function

Syntax

STRIG(n%)

Description / Parameter(s)

n% A value that specifies a joystick status condition:
 
n%Condition
0Lower joystick A trigger was pressed since last STRIG(0)
1Lower joystick A trigger is currently pressed
2Lower joystick B trigger was pressed since last STRIG(2)
3Lower joystick B trigger is currently pressed
4Upper joystick A trigger was pressed since last STRIG(4)
5Upper joystick A trigger is currently pressed
6Upper joystick B trigger was pressed since last STRIG(6)
7Upper joystick B trigger is currently pressed
STRIG returns -1 if the condition is true, 0 otherwise.

Example

PRINT "Press Esc to exit." DO IF STRIG(0) OR INKEY$ = CHR$(27) THEN EXIT DO LOOP DO BEEP 'BEEP while trigger A is pressed. LOOP WHILE STRIG(1)