EasyManua.ls Logo

Commodore CBM - Restore; Return; Stop

Commodore CBM
447 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RESTORE
The
RESTORE
statement resets the DATA statement pointer to the begin-
ning of data.
Format:
RESTORE
RESTORE
may be given in immediate or program mode.
Example:
RETURN
10 DATA 1.2.N44
20
READ
A.B.B$
30
RESTO
RE
40
READ
X.Y.Y$
A=1.B=2.B$="N44"
X=1.Y=2.Y$="N44"
The
RETURN
statement branches program control to the statement in the
program
following
the most recent
GOSUB
calI.
Format:
RETURN
Each subroutine must terminate
with
a
RETURN
statement.
Example:
100
RETURN
Note
that
the
RETURN
statement. for returning program control from a
subroutine. and the
RETURN
key.
for moving the cursor to the beginning of the
next display line. are entirely different operations. You should have no trouble dis-
tinguishing these
two
functions.
STOP
The
STOP
statement causes the program to stop execution and return con-
trol to
PET
BASIC
with
a break message printed.
Format:
STOP
On
encountering a
STOP
statement. execution control
is
returned to
PET
BASIC. The following message
is
printed:
BREAK
IN
line
The line number in the statement above indicates where the
STOP
statement was
executed. Typing in CONT from the keyboard continues program execution at the
statement
following
the
STOP
statement.
148

Table of Contents

Other manuals for Commodore CBM

Related product manuals