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 #178 background imageLoading...
Page #178 background image
Chapter
10
I
BASIC
Ke.ywords
IF
X
>
0 AND
Y
<>
0 THEN
Y
=
X
+
180
assigns the value
X
+
180
to
Y
if
both exm-essions are true.
Otherwise, BASIC executes the next program- line, skipping the
THEN clause.
IF
A$
=
"YES" THEN 210 ELSE
IF
A$
=
"NO"
THEN
branches
to
Line 210 if A$ is YES. If not, BASIC skips
to
the
first ELSE, which introduces a new test.
If A$ is
NO,
then
BASIC branches
to
Line 400. If A$ is any value besides NO
or
YES, BASIC branches
to
Line 370.
400 ELSE 370
Sample
Program
IFiTHENiELSE statements may be nested. However, you must
take care
to
match up the
IFs
and ELSEs. (If the statement does
not contain the same number
of
ELSEs and IFs, each ELSE is
matched with the closest unmatched IF.)
1040 INPUT "ENTER TWO NUMBERS";
A,
B
1050
IF
A
<=
B
THEN
IF
A
<
B
THEN PRINT
A;
ELSE
PRINT
"
NEITHER"; ELSE PRINT
E;
1060 PRINT
"
IS
SMALLER THAN THE OTHER"
This program prints the relationship between the 2 numbers
entered.
176

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