Function | JOY | ||||||||||||
Description | function: read status of joystick | ||||||||||||
Syntax | status=Joy(port number) | ||||||||||||
Remarks | This inspects what is happening with the joystick and makes a report. If the joystick you are interested in is plugged into the joystick port, the computer must be told to look at port number (1). If you are using the mouse port call that port number (0). When you run the example routine, reports are given about the movements of the joystick and the status of the fire-button in the form of binary numbers. The pattern of ones and zeros in the report can then be inspected. Binary bits shown as zero indicate that nothing is happening, whereas if any of the bits in the report is shown as a one, it means that the joystick has been moved in the direction that relates to that bit. The return values list those bits along with their meanings. | ||||||||||||
Return Value |
| ||||||||||||
Example | Do J=Joy(1) Print Bin$(J,5),J Loop [Edit] long example listings will be reserved for the online help. The Language reference entries will only contain 10-20 line listings where deemed necessary. | ||||||||||||
See Also | Each aspect of the joystick status can be accessed individually, using the following functions: JLEFT, JRIGHT, JUP, JDOWN |
Function | JOY | ||||||||||||
Description | function: read status of joystick | ||||||||||||
Syntax | status=Joy(port number) | ||||||||||||
Remarks | Reports the movements of the joystick and the status of the fire-button. The port used for the joystick must be defined. Joystick port = (1) mouse port = (0) | ||||||||||||
Return Value |
| ||||||||||||
Example | Do J=Joy(1) Print Bin$(J,5),J Loop The Quick Reference is restricted to small 3 or 4 line example snippets. | ||||||||||||
See Also | Related functions: JLEFT, JRIGHT, JUP, JDOWN |
Code | Description | Syntax |
LA | Create a Label. | LA label_number; |
Function | Description | Syntax |
JOY | function: read status of joystick | status=Joy(port number) |
Alphabetical | Categorised | |
BREAK ON BREAK OFF COMMAND LINES MATCH SORT | Array Operations --MATCH --SORT Program run commands --BREAK ON --BREAK OFF --COMMAND LINES |