EasyManua.ls Logo

Commodore Plus 4 - Page 171

Commodore Plus 4
234 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...
10
X
=
VAL("RIUO17*M)
X
=
0
10
X
=
VAL("-1.23.23.23")
X=-1.23
Strinp
Stnn9
functions
differ
from
numeric
functions
in
that
they
return
Functions
cnaracters>
graphics
or
numbers
from
a
string
(defined
by
quotation
marks)
instead
of
a
number.
CHR$(X)
This
function
returns
a
string
character
whose
ASCII
code
is
X.
ERR$(N)
Returns
string
describing
error
condition
N
(see
TRAP)
HEX$(N)
Returns
a
4
character
string
containing
the
hexadecimal
representa
tion
of
value
N
(0
<
N
<
65535)
LEFTS(XS.X)
This
returns
a
string
containing
the
leftmost
X
characters
of
XS.
LEN(X$}
Returns
the
number
of
characters
(including
spaces
and
other
symbols)
in
the
string
X$.
MID$(X$,S,X)
This
returns
a
string
containing
X
characters,
starting
from
the
Sth
character
in
XS.
MID$
can
also
be used on
the
left
side
of
assignment
statement as a
pseudo-variable
as
well
as
a
function.
MID$
(string
variable,
starting
position,
length)
=
source
string.
This
function
reassigns
values
of
positions
(starting
position)
through
(starting
position
+
length)
of
source
string
to
the
characters
of
string
variable
in
corresponding
locations.
Length
defaults
to
the length
of
string
variables,
and
an
error
results
if
(starting
position
+
length)
is
greater
than
the length
of
the
source
string.
EXAMPLE:
10
A$="THE
DOG
IN
THE
HAT":
20
PRINT
A$
30MID$(A$,5,3)-"CAT"
40
PRINT
A$
162

Other manuals for Commodore Plus 4

Related product manuals