EasyManua.ls Logo

Commodore VIC-20 - Page 378

Commodore VIC-20
404 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...
364 The VIC 20
User
Guide
it may be placed as the last statement on a multiple-statement line.
A
REM
statement cannot be placed ahead of any other statements on a
multiple-statement line, since all text following the REM
is
treated as a
comment. REM statements may be placed in the path of program execu-
tion, and they may be branched to.
Example:
10
REM
***
* * * *
***
20
REM
***PROGRAM
EXCALIBUR***
30
GOTO
55
REM
BRANCH
IF
OUT
OF
DATA
RESTORE
The RESTORE statement resets the DATA statement pointer to the
beginning of data.
Format:
RESTORE
RESTORE may be given in immediate or program mode.
Example:
10
DATA
1,2,N44
213
READ
A,B,B$
313
RESTORE
40
READ
X,Y,Z$
RETURN
A=l,
B=2, B$="N44"
X=l,
Y=2, Z$="N44"
The RETURN statement branches program control to the statement in
the program following the most recent GOSUB call. Each subroutine must
terminate with a RETURN statement.
Format:
RETURN
Example:
100
RETURN
Note that the RETURN statement returns program control from a
subroutine, whereas the
RETURN key moves the cursor to the beginning of
the next display line. The two are not related in any way.

Other manuals for Commodore VIC-20

Related product manuals