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 #174 background imageLoading...
Page #174 background image
Chapter
10
I
BASIC
Keywords
GOSUB
Statement
GOSUB
line
Branches to the subroutine beginning at the specified line num-
ber.
Every subroutine must end with a RETURN. You can call a sub-
routine as many times as you want. When BASIC encounters a
RETURN statement in the subroutine, it returns to the state-
ment that follows the GOSUB.
GOSUB is similar
to
GOT0 in that it may be preceded by a test
st at ement
.
Example
GOSUB 1000
branches to the subroutine at Line 1000.
Sample Program
260 GOSUB 280
270 PRINT "BACK FROM SUBROUTINE": END
280 PRINT "EXECUTING THE SUBROUTINE"
290 RETURN
transfers control from Line 260 to the subroutine beginning at
Line 280. Line 290 instructs the computer to return to the
statement immediately following GOSUB.
172

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