Commodore VIC-20 User Manual page 129

Hide thumbs Also See for VIC-20:
Table of Contents

Advertisement

3. STATEMENTS
CLOSE
This command completes and closes any files used by OPEN
statements. The number following the word CLOSE is the ffle number
to be closed.
EXAMPLE:
CLOSE 2
Only file #2 is closed.
CLR
This command win erase any variables in memory, but leaves the pro
gram itself intact. This command is automatically executed when a
RUN command is given,
CMD
CMD sends the output which normally would go to the screen (i.e.
PRINT statements, LISTS, but not POKEs into the screen) to another
device instead. This could be a printer, or a data file on tape or disk.
This device or file must be OPENed first. The CMD command must be
followed by a number or numeric variable referring to the file.
EXAMPLE:
OPEN 1,4
OPENS device #4, which is the printer.
CMD 1
All normal output now goes to the printer.
LIST
The LESTing goes to the printer, not 1he screen—even the
word LIST that you typed!
To start sending back to the screen normally, just CLOSE the file,
DATA
This statement is followed by a list of items to be used by READ
statements. The items may be numbers or words, and are separated
by commas. Words need not be inside ol quote marks, unless they
contain any of the following characters: SPACE, colon, or comma. If
two commas have nothing between them, the value will be READ as a
zero for a number, or an empty string.
EXAMPLE OF A DATA STATEMENT:
DATA i00,200,FRED,btHELLO, MOM",,3.14Tabc123
119

Advertisement

Table of Contents
loading

Table of Contents