Chapter
10
I
BASIC
Keywords
PRINT
Statement
PRINT data[,data,
...I
Prints numeric
or
string
data
on the display. You can substitute
a question mark
(?)
in place of the word PRINT.
Data
is any numeric
or
string constant
or
variable. If you omit
datu,
BASIC prints
a
blank line. If you specify more that
1
data
item in the statement, separate them by commas, semicolons, or
spaces.
If
you
use commas, the cursor automatically advances
to
the
next tab position before printing the next item. (BASIC divides
each line into print zones containing 14 positions each, at col-
umns 14, 28, 42, 56, and 70.)
If you use semicolons or spaces
to
separate the data items,
PRINT prints the items without any spaces between them.
BASIC begins the next PRINT item where the last one stopped.
If no trailing punctuation is
at
the end of the PRINT statement,
the cursor drops
to
the beginning of the next line.
If
BASIC tries
to
print
a
string longer than it can
fit
on the cur-
rent line, it moves
to
the next line and prints the string.
Single precision numbers with 7 or fewer digits that can be accu-
rately represented are printed in regular format rather than ex-
ponential format.
For
example, 1E-7
is
printed as .0000001; 1E-8
is
printed as 1E-08.
Double precision numbers with 16
or
fewer digits that can be ac-
curately represented are printed in regular format rather than
exponential format.
For
example, 1D-15 is printed as
.000000000000001; 1D-16 is printed as 1D-16.
BASIC prints all numbers with a trailing blank and prints posi-
tive numbers with
a
leading blank. Negative numbers are pre-
ceded by
a
minus sign.
String constants must be enclosed in quotation marks.
270