EasyManua.ls Logo

Commodore 128 - Page 297

Commodore 128
448 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...
The characters inside quotes are often called literals because
they are printed literally, exactly as they appear. Variable names
have the value they contain (either a number or a string) printed.
Functions also have their number values printed.
Punctuation marks are used to help format the data neatly on the
screen. The comma tabs to the nearest tenth column, while the
semicolon prints items next to each other. (See also Section 3,
Printing Numbers.) Either punctuation mark can be used as the
last symbol in the statement. This results in the next PRINT
statement acting as if it is continuing the previous PRINT
statement. Print on its own moves to the start of the next line -
leaving a blank line.
EXAMPLES: RESULTS
10 PRINT HELLO HELLO
20 A$=THERE:PRINT HELLO;A$ HELLO THERE
30 A=4:B=2:PRINT A+B 6
40 J=41:PRINT J;:PRINT J-1 41 40
50 PRINT A;B;:D=A+B:PRINT D;A-B 4 2 6 2
See also POS, SPC and TAB FUNCTIONS
PRINT#
Output data to files
PRINT# file number, print list
There are a few differences between this statement and the
PRINT. Most importantly, the word PRINT# is followed by a
number, which refers to the data file previously OPENed. The
number is followed by a comma and a list of items to be output to
the file. The semicolon acts in the same manner for spacing with
printers as it does in the PRINT statement, commas output 10
spaces. Some devices may not work with TAB and SPC.
EXAMPLE:
10 OPEN 4,4
20 PRINT#4,HELLO THERE!,A$,B$
17-55

Table of Contents

Other manuals for Commodore 128

Related product manuals