Sharp PC-1403 Operation Manual page 191

Hide thumbs Also See for PC-1403:
Table of Contents

Advertisement

185
MID$
is
a
string function which returns
a
middle
portion of
the
string in
the
first
argument.
The first numeric argument indicates
the
first
character
position
to be included in the
result. The
second
numeric argument indicates
the
number
of
characters
that
are to be
included.
MID$ ("ABCDEF",
2,3) is
"BCD".
1 MID$
(string
expression,
num.
exp.
1,
num. exp.
2)
LEN is
a
string function which returns the
length of the string argument.
LEN
"ABCDEF"
is
6.
1 LEN string expression
LEFT$ is
a
string
function which returns the leftmost part
of the string in the first
argument.
The number
of characters
returned
is determined by
the numeric expres-
sion.
LEFT$
("ABCDEF", 2) is
"AB".
1 LEFT$ {string expression,
numeric
expression)
CHR$ is
a
string
function that returns
the
character
which corresponds to the numeric
character code of its
argument. The chart
of
character codes and their relationship to
characters is given in Appendix
B.
CHR$
65
is
"A".
~-------------------
- -----·-·
-
·-··-·-
1 CHR$ numeric
expression
ASC is
a
string
function which returns
the
numeric character
code
value of
the
first
character in its argument. The chart
of character
codes
and
their
relationship to
characters is given
in Appendix
B.
ASC
"A"
is
65.
The
COMPUTER
uses
ASC! I codes and
their
characters.
1 ASC string expression
String
functions are a group
of
operations used
for
manipulating strings. Some
take a
string argument and
return a numeric value. Some take a
string
argument
and return
a
string. Some
take
a
numeric
value
and
return
a string.
Some
take
a
string
argument
and one
or two numeric
arguments
and
return
a
string.
Many dialects of BASIC
require
the
argument of
a function
to be
enclosed in
parentheses.
The COMPUTER
does
not
require these
parentheses, except
when
it is necessary to indi
c ate
what
part
of
a
more
complex expression is to be
included in
the
argument.
String
functions
with two
or
three
arguments
all require the
parentheses.
String Functions
Functions
String Functions

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents