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 #198 background imageLoading...
Page #198 background image
Chapter
10
I
BASIC
Keywords
LEFT$ Function
LEFT$(string,
num
ber)
Returns the specified number
of
characters from the left portion
of
string.
Number
must be an integer in the range
1
to 255. If
number
is
equal
to
or greater than the length of the
string,
BASIC returns
the entire string.
Examples
prints BATTLE.
PRINT LEFTS("BATTLESHIPS",
6)
PRINT LEFT$C"BIG FIERCE
DOG",
28)
Since BIG FIERCE DOG is fewer than 20 characters, BASIC
prints the whole phrase.
Sample Program
740
A$
=
"TIMOTHY"
750
E$
=
LEFT$(A$,
3)
760
PRINT
E$;
"--THAT'S SHORT FOR
";
AB
When you run this program, BASIC prints:
TIM--THAT'S SHORT FOR TIMOTHY
Line 750 gets the
3
left characters
of
A$ and stores them in
B$.
Line 760 prints these
3
characters, a string, and the original
contents
of
A$.
196

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