Tandy 1000 Basic Reference Manual page 220

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter 10 I
BASIC
Ke.ywords
MID$
Statement
MID$(oldstring,start[ ,length])
=
newstring
Replaces a portion of
oldstring
with
newstring.
Oldstring
is the variable name of the string you want to change.
Start
is a number specifying the position of the first character
you want to change.
Length
is a number specifying the number of characters you
want to replace.
Newstring
is the string
to
replace a portion of
oldstring.
The length of the resultant string is always the same as the
original string. If
newstring
is shorter than
length,
the entire re-
placement string is used.
Examples:
1 0 FIB
=
" L I N C O L N "
20 MID$CAB,3,4)
=
" 1 2 3 4 5 " : P R I N T A B
prints LI1234N.
Replace Line 20 with:
2 0 MIDB<FIB,S)
=
" 0 1 " :
P R I N T
A $
and BASIC prints LINC01N
218

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents