Examples:
?MID$("ABCDE",2,1)
?MID$("ABCDE".3.2)
?MID$("ABCDE",3)
RIGHT$
Prints
B.
Prints
CD.
Prints
CDE.
RIGHT$
returns the rightmost characters in a string.
Format:
RIGHT$(arg,count)
where:
arg
count
is
a string
constant
variable, or expression.
is
a numeric
constant
variable, or expression
specifying the number of rightmost characters
to
be
returned, in the range
0<count~255.
Examples:
?RIGHT$(ARG,2)
MM$=RIGHT$(X$+"
#").
STR$
Prints
RG.
Prints 100.
Prints 1
E+
1
O.
STR$
returns the string equivalent of the numeric argument.
Format:
STR$(arg)
where:
arg
is
a numeric
constant
variable, or expression.
STR$
converts the number to the same format
as
it
wou
Id
be
printed
out
in a
PRINT
statement. The first character of the string
is
a blank if a number
is
positive,
or it
is
a minus sign if the number
is
negative.
Examples:
A$=STR$(14.6)
?STR$(1
E2)
?STR$(1E10)
VAL
VAL
returns the numeric equivalent of the string argument.
Format:
VAL(arg)
where:
arg
is
a string
constant
variable, or expression.
The number returned by VAL may
be
used in arithmetic computations.
158