PRINT Statement Details
Syntax
PRINT [expressionlist][{,|;}]
If expressionlist is omitted, a blank line is printed. If
expressionlist is included, the values of the expressions are printed
on the screen. The expressions in the list may be numeric or string
expressions. (String literals must be enclosed in quotation marks.)
A printed number is always followed by a space. If the number is
positive, it is also preceded by a space; if the number is negative,
it is preceded by a minus sign (-).
There are two formats that PRINT uses to display single- and
double-precision numbers: fixed point and floating point. If PRINT
can represent a single-precision number in the fixed-point format
with seven or fewer digits and no loss of accuracy, then it uses the
fixed-point format; otherwise, it uses the floating-point format.
For example, the number 1.1E-6 is output displayed as .0000011, but
the number 1.1E-7 is output as 1.1E-7.
Similarly, if PRINT can represent a double-precision number in the
fixed-point format with 16 or fewer digits and no loss of accuracy,
then it uses the fixed-point format; otherwise, it uses the floating
point format. For example, the number 1.1D-15 is output as
.0000000000000011, but the number 1.1D-16 is output as 1.1D-16.
The PRINT statement supports only elementary BASIC data types
(integers, long integers, single-precision real numbers, double-
precision real numbers, and strings). To print information in a
record, use the PRINT statement with individual record elements
as in the following fragment:
TYPE MyType
Word AS STRING * 20
Count AS LONG
END TYPE
DIM Myrec AS MyType
PRINT Myrec.Word
Print Positions
The position of each printed item is determined by the punctuation
used to separate the items in the list. BASIC divides the line into
print zones of 14 spaces each. In the expression list, a comma makes
the next value print at the start of the next zone. A semicolon makes
the next value print immediately after the last value. Typing one
or more spaces or tabs between expressions has the same effect as
typing a semicolon.
If a comma or a semicolon terminates the list of expressions, the
next PRINT statement prints on the same line, after spacing
accordingly. If the expression list ends without a comma or a semicolon,
a carriage-return and line-feed sequence is printed at the end of
the line. If the printed line is wider than the screen width, BASIC
goes to the next physical line and continues printing.