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 #233 background imageLoading...
Page #233 background image
Chapter
10
I
BASIC Keywords
ON/GOTO
Statement
ON
n
GOTO
line[,line,
...
I
Looks
at
n
and transfers program control
to
the nth line listed.
For example, if
n
equals
1,
BASIC branches to the first line
listed; if
n
equals
2,
BASIC branches
to
the second line listed.
N
must be in the range
0
to
255.
If necessary, BASIC rounds
n
to
an integer before evaluating it. If
n
is
0
or
is greater than the
number
of
line numbers listed, BASIC continues with the next
statement. If
n
is
negative
or
is greater than
255,
an "Illegal
function call" error occurs.
Example
10 ON MI GOTO 150, 160, 170, 150, 180
tells BASIC
to
evaluate MI. If MI equals
1,
BASIC branches to
Line
150;
if MI equals
2,
BASIC branches
to
Line
160;
and
so
on. If MI
is
outside
of
the range
1
to
5,
BASIC either continues
with the next statement or generates an Illegal function call,
as
mentioned earlier.
Sample Program
5
REM <CAPS> MUST BE ON
10 INPUT "ENTER
A,B,
or
C,";LS
20 L=CISC
CLS)
30
ON
L-64 GOTO 50, 60, 70
40 PRINT "TRY AGCI1N":GOTO 10
60
PRINT
"YOU
TYPED 'B'":END
70 PRINT "YOU
TYPED 'C'":END
50
PRINT
91~0~
TYPED
'A'~~:END
231

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