Download Print this page

VTech PreComputer 2000 Manual page 42

Advertisement

GOSUB ... AETURN
Line#
GOSUB
first line number of subroutine
.
Line#
Line#
Line#
Line#
first line number of subroutine
Line#
Line#
RETURN
The GOSUB command tells the computer to GOTO another line
number.
After
the process has been completed
,
a RETURN statement is used to send the
computer back to the line immediately after the
GOSUB.
These statements are
used to process a series of commands that are frequently
used.
Example:
30 GOSUB 120
other program lines
120 PRINT "WELCOME TO THE"
130 PRINT "PRECOMPUTER 2000"
140 RETURN
GOTO
Line #
GOTO
line number
The GOTO statement is used to change the normal flow of the program (which
is from lowest statement number to highest)
.
A GOTO command transfers control
to the specified
line.
Examples:
I
10 GOTO 130
I
200 GOTO 65
41

Advertisement

loading
Need help?

Need help?

Do you have a question about the PreComputer 2000 and is the answer not in the manual?

Subscribe to Our Youtube Channel