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 #177 background imageLoading...
Page #177 background image
Chapter
10
I
BASIC
Keywords
IF/THE
N/E
LSE
Statement
IF
expression THEN statemnt(s)[ELSE statemnt(s)]
Tests a conditional expression and makes a decision regarding
program flow.
Expresswn
is any numeric or string expression, usually making
logical or relational comparisons.
Statement
can be
1
or
more valid BASIC statements.
If
there is
more than
1
statement, they must be separated by colons. You
can also specify a line number for BASIC
to
branch as a
statement
.
If
expression
is true, BASIC executes the THEN
statement.
If
expresswn
is
false, BASIC executes the matching ELSE
statement
or the next program line.
You can also use IFiTHEN
to
test the numeric value
of
a vari-
able.
If
the variable contains a
0,
the expression is true; other-
wise, the expression is false.
Examples
IF
X
>
127
THEN PRINT "OUT OF RANGE"
:
END
passes control
to
PRINT and, then
to
END if
X
is greater than
127.
If
X
is not greater than
127,
BASIC executes the next line
in the program, skipping the PRINT and END statements.
IF A
<
B
THEN PRINT
"A
<
E"
ELSE PRINT
"E
<=
A"
tests the first expression.
If
it is true, BASIC prints
A
<
B.
Otherwise, BASIC jumps
to
the ELSE statement and prints
B
<=
A.
175

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