140 User's
Handbook
to the Atari 400/ 800 Computers
or
a semicolon. A semicolon causes the values
to
be
printed
on
the
same
line
without
any spaces. A comma causes the
next
item
to
be
printed
at the next
column
stop location. A
comma
or
semicolon
is
optional
at the end
of
a LPRINT statement. If a
semicolon
is
used at the end
of
a LPRINT statement, the next
output
will be adjacent
to
the last
output.
If a comma
is
used at
the end
of
an
LPRINT 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
an
LPRINT statement, the next
output
occurs
on
the next line.
When
an
LPRI
NT statement
is
executed,
an
error
occurs
if
the
printer
is
not
ready
to
operate.
The
LPRINT statement
uses
I/ O channel 7. If channel 7
is
open
when
an
LPRINT statement
is
executed, an
error
will occur.
EXAMPLE
10
DIM
A$(5)
20
A$
= "GREEN"
30
X =
25
40
LPRINT "INVENTORY: ";X,A$
In the previous example, LPRINT
is
used
to
print
a string
constant, a string variable, and a
num
eric variable. The LPRINT
statement at
line
40
prints the
word
INVENTORY
followed
by a
colon
and a space. Any characters that appear in
quotation
marks are
reproduced
as
they appear. A semicolon separates the
items,
so
the value
of
X
(25)
follows the string.
A comma separates the
variable names X and
A$
,
so
the value
of
A$
is
printed
in
the next display
column.
NEW
The NEW
command
eliminates the
current
program
in the
computer's
memory.
The NEW
command
erases all variables,
turns
off
all voices, and closes all I/ O channels except channel
o.