QBasic 1.1: STICK Function
Explanation
STICK Function
Returns the coordinates of a joystick.
Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Syntax
Description / Parameter(s)
n% |
Indicates the coordinate returned: |
|
n% | Returns |
0 | x coordinate of joystick A |
1 | y coordinate of joystick A |
2 | x coordinate of joystick B |
3 | y coordinate of joystick B |
|
You must call STICK(0) before STICK(1), STICK (2), or STICK(3). STICK(0) records the current coordinates. |
Example
Temp% = STICK(0)
PRINT STICK(2), STICK(3)