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 #159 background imageLoading...
Page #159 background image
Chapter
10
I
BASIC
Kevwords
ERROR
Statement
ERROR
code
Simulates
a
specified error during program execution.
Code
is an integer expression in the range
0
to
255
specifying
one
of
BASIC's
error codes.
This statement
is
used mainly for testing an ON
ERROR
GOTO
routine. When the computer encounters an
ERROR
statement, it
proceeds as if the error corresponding
to
that code has occurred.
(Refer
to
Chapter
12
for a listing
of
error codes and their
meanings.)
Example
ERROR 1
causes a "NEXT without
FOR"
error (Code
1)
when
BASIC
reaches this line.
Sample Program
110 ON ERROR GOTO
400
120 INPUT "WHAT IS YOUR BET";
B
130 IF
B>5000
THEN ERROR 21 ELSE GOTO 420
400 IF ERR
=
21 THEN PRINT "HOUSE LIMIT
IS
$5
0 0
0"
410 IF ERL
=
130
THEN RESUME
500
420
S
=
S+B
430 GOTO 120
500
PRINT "THE TOTAL AMOUNT OF YOUR BET 1S";S
510 END
This program receives and totals bets until one of them exceeds
the house limit.
157

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