QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The STRIG(n) statement controls event trapping for a particular joystick or game pad device button.

Syntax

STRIG(button%) {ON OFF STOP}

QB64 Syntax

STRIG[(button_function%[, device_number%])] {ON OFF STOP}

Description

Example(s)


ON STRIG(0) GOSUB 10
STRIG(0)ON

DO
    PRINT ".";
    _LIMIT 30
LOOP UNTIL INKEY$ <> ""
END

10
a$ = "[STRIG 0 EVENT]"
FOR x = 1 TO LEN(a$)
    PRINT MID$(a$, x, 1);
    _DELAY 0.02
NEXT
RETURN 

See Also