EasyManua.ls Logo

Commodore 128D - Page 327

Commodore 128D
427 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
I
)
n
INT
JOY
string
2
is
null,
INSTR
returns
the
value
of
the
STARTING
POSITION
or
the
value
1.
EXAMPLE:
PRINT INSTR
("COMMODORE
128","128")
11
—Return
integer
form
(truncated)
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
—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
fire
button
is
pressed.
The
direction
is
indicated
as
follows:
LEFT
RIGHT
319
EXAMPLES:
JOY
(2)
=135
Joystick
2
fires
to
the
left:
(128
+
7).
IF
(JOY
(1)
>127)
THEN
PRINT
"FIRE".
Determines
whether
the
fire
button
is
pressed
on
joystick
#1.
BASIC
7.0
ENCYCLOPEDIA-Basic
Functions

Table of Contents

Other manuals for Commodore 128D

Related product manuals