MID$
Statement
MID$(oldstring, position [,length]) = replacement string
Replaces a portion of
an
oldstring with replacement string.
Oldstring
is the variable name of the string you want to change.
Position is a number specifying the position of the first character to be
changed.
Length is a number specifying the number of characters to be
replaced.
Replacement string
is
the string to replace a portion of oldstring.
The length of the resultant string is always the same as the original
string.
If
replacement string is shorter than length, the entire
replacement string
is
used.
Examples:
A$ =
"LINCOLN"
MIO$
(A$,
3,
4)
=
"12345":
PRINT
A$
returns
L11234N.
MIO$
(A$,
5)
=
"01":
PRINT
A$
returns
L1NC01
N.
MIO$
(A$,
1,3)
=
"***":
PRINT
A$
returns ***COLN.
2-128