INT
Return integer form (whole number part) of a floating point
value
INT(X)
This function returns the integer value of the expression. If the
expression is positive, the fractional part is left out. If the
expression is negative, any fraction causes the next lower integer
to be returned.
EXAMPLES:
PRINT INT(3.14)
3
PRINT INT(-3.14)
-4
JOY
Return position of joystick and the status of the fire button
JOY(N)
When N equals:
1 JOY returns position of joystick 1
2 JOY returns position of joystick 2
Any value of 128 or more means that the fire button is also
pressed. To find the JOY value, add the direction value of the
joystick plus 128, if the JOY fire button is pressed. The direction
is indicated as follows:
1
8
7 0
6
5
EXAMPLES:
JOY (2) is 135
When Joystick 2 fires to the left.
IF (JOY (1) AND 128) = 128 THEN PRINT “FIRE”.
Determines whether the fire button is pressed.
18-8