162 User's
Handbook
to
the Atari 400/ 800
Computers
If a semicolon
is
used
at
the end
of
a
PRI
NT statement, the next
PRINT statement
output
will
be adjacent
to
the last
output.
If a
comma
is
used
at
the end
of
a PRINT statement, the
next
output
occurs
at
the
next
column
stop after
the
last
output.
If
neither
a
comma
nor
a semicolon
is
used
at
the
end
of
a
PRI
NT statement,
the
next
output
occurs on
the
next
line
.
Column
stops
occur
at
intervals
of
10
spaces.
However,
if
the
last
character that
was
printed
is
within
two
spaces
of
the
next
column
stop, that
column
stop
will
be
ignored.
As
a result, items
in
a PRINT statement that are separated by commas
will
have
at
least
two
spaces
between
them
.
EXAMPLE
10
DIM
A$(1S)
20
A$ =
"THOMAS
R
SMITH"
30 X =
27
40
PRINT
"NAME:"
; A$,
"AGE:";
X
50 END
The previous example contains a
program
that
uses
a PRINT
statement.
At
line
10, the variable
A$
is
dimensioned
.
At
line
20,
the
variable A$
is
assigned
the
string value
"THOMAS
R SMITH".
At
line 30,
the
variable X
is
assigned the value 27.
Line
40
contains a PRINT statement. The string constant
"NAME:"
is
printed
first,
followed
immediately
by
the
value
of
the
variable A$. Since a comma follows
the
variable A$, the string
constant
"AGE:"
is
printed
in the next available
column.
However,
the
l
ast
character
was
printed
in
column
19,
so
the
column
stop
at
column
20
is
ignored.
As
a result,
the
string
constant
"AGE:" and the value
of
the variable X are displayed in
the last co
lumn
.
A
PRINT statement requires
an
I/ O channel
number
for
any
output
device
other
than
the
display. The I/ O channel must be
open
for
an
appropriate
output
operation
.