EasyManua.ls Logo

Apple IIe - Page 147

Apple IIe
320 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...
Apple
BASIC Reference
Guide
147
The RIGHT$
function
returns
a
string
value. The first
argument
is
a
string
constant
or
a
string
variable. The second
argument
is
a
numeric
value.
The
string
returned
consists
of
the
number
of
characters specified by
the
numeric
argument.
These characters
are
the
rightmost
characters in
the
string
argument.
Example
10
A$=
"WILLIAM
JONES"
20
PRINT A$
30
PRINT RIGt-IT$(A$,5)
]RUN
[Ret]
WILLIAM
JONES
JONES
The
preceding
example
contains
a
program
that
uses
a RIGHT$
statement.
At
line
10,
the
string variable A$
is
assigned
the
value
"WILLIAM
JONES".
At
line
20,
the
value
of
A$
is
printed.
At
line
30,
the
rightmost
5 characters
of
the
value
of
A$ are displayed.
If
the
value
of
the
numeric
argument
exceeds
the
length
of
the
string
argument,
the
entire
string
value
is
returned.
If
the
value
of
then
u
meric
argument
is
less
than
one
or
greater
than
255,
the
following
error
message
will
be displayed:
ILLEGAL
QUANTITY
ERROR
Applesoft
RND
Integer
The RND
function
is
used
to
generate
"random"
numbers.
Configuration
X=RND(a)
In
Applesoft
BASIC,
RND
will
return
a
random
number
greater

Other manuals for Apple IIe

Related product manuals