EasyManuals Logo

Tandy 1000 Basic Reference Manual

Default Icon
411 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #221 background imageLoading...
Page #221 background image
Chapter
10
I
BASIC
Ke.ywords
MID$
Function
MID$(string, start
[,length]>
Returns
a
substring
of
a
string.
Length
is the number
of
characters in the substring. It must be
in the range
1
to
255.
Start
specifies the position in the string from which
to
get the
substring.
If you omit
length
or if there are fewer than that number
of
char-
acters
to
the right
of
start
position, BASIC returns all characters
to the right
of
the character
at
the
start
position including that
character
at
start.
If
start
is greater than
number
of
characters in
string,
BASIC re-
turns a null string.
Examples
10
A$
=
"WEATHERFORD"
20 PRINT
MIDSCAS,
3,
2)
prints AT
F$
=
MID$<A$,
3)
puts ATHERFORD into F$.
Sample Program
200 INPUT "AREA CODE AND NUMBER (NNN-NNN-NNNN)";
PH$
210 EX$
=
MID$CPH$,
5,
3)
220 PRINT "NUMBER
IS
IN THE
"
EX$
"
EXCHANGE."
The first
3
digits
of
a local phone number are sometimes called
the exchange
of
the number. This program looks at a complete
phone number (area code, exchange, last
4
digits) and picks out
the exchange.
219

Table of Contents

Other manuals for Tandy 1000

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tandy 1000 and is the answer not in the manual?

Tandy 1000 Specifications

General IconGeneral
ProcessorIntel 8088
Processor Speed4.77 MHz
RAM128 KB (expandable to 640 KB)
Operating SystemMS-DOS 2.11
ManufacturerTandy Corporation
Release Year1984
StorageSingle or double 5.25" floppy disk drive (360 KB), optional hard drive
SoundTandy 3-voice sound
PortsParallel, Serial
GraphicsCGA (Color Graphics Adapter)
Graphics Modes320x200, 640x200

Related product manuals