EasyManua.ls Logo

Commodore 1541 - Page 27

Commodore 1541
80 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...
PRINT#and
INPUT*
The
PRINT#
command
works
exactly
like
the
PRINT
statement,
except
that
out
put
is
re-directed
to
the
disk
drive.
The
reason
for
the
special
emphasis
on
the
word
ex
actly
is
thai
all
the
formatting
capabilities
of the
PRINT
statement,
as
applies
to
punc
tuation
and
data
types,
applies
here
too.
It
just
means
that
you
have
to
be
careful
when
putting
data
into
your
files.
FORMAT
FOR
WRITING
TO
FILE
WITH
PRINTS:
PRINTS
file*,
data
list
The
filefl
is
the
one
from
the
OPEN
statement
when
the
file
was
created.
The
data
list
is
the
same
as
the
regular
PRINT
statement
a
list
of
variables
and/or
text
inside
quote
marks.
However,
you
must
be
especially
careful
when
writing
data
so
that
it
is
as
easy
as
possible
to
read
the
data
back
again.
When
using
the
PRINTS
statement,
if
you
use
commas
(,)
to
separate
items
on
the
line,
the
items
will
be
separated
by
some
blank
spaces,
as
if
it
were
being
formatted
for
the
screen.
Semicolons
(;)
don't
result in
any
extra
spaces.
In
order
to
more
fully
understand
what's
happening,
here
is
a
diagram
of a
se
quential
file
created
by
the
statement
OPEN
5, 8, 5,
"O:TEST,S,W":
tor
char
1
7
8
10
It
12
13 !4 15 ...
The
eof stands
for
the
end-of-file
marker.
String
data
entering
the
file
goes
in
byte
by
byte,
including
spaces.
For
instance,
let's
set
up
some
variables
with
the
statement
AS=
"HELLO";
BS=
"ALL":C$=
"BYE".
Here
isapicture
of
a
file
after
the
statement
PRINTS
5,
A$;
B$;
CS:
diar
H
1
El
2
L
3
L
4
0
i
A
i|l
7
|.
B
'I
Y
10
H
CR
12
eof
13
CR
stands
for
the
CHRS
code
of
13,
the
carriage
return,
which
is
PRINTed
at
the
end
of
every
PRINT
or
PRINTS
statement
unless
there
is
a
comma
or
semicolon
at
the
end
of
the
line.
NOTE:
Do
not
leave
a
space
between
PRINT
and
S,
and
do
not
try
to
abbreviate
the
command
as
?#.
See
the
appendixes
in
the
user
manual
for
the
correct
abbreviation.
FORMAT
FOR
INPUTS
STATEMENT:
INPUTS
file*,
variable
list
2:

Other manuals for Commodore 1541

Related product manuals