Download Print this page

Radio Shack TRS-80 model III Owner's Manual page 133

Mini-disk operation, trsdos disk operating system, disk basic programming language
Hide thumbs Also See for TRS-80 model III:

Advertisement

TRS-80
MODEL
III
DISK
SYSTEM
A
print#
statement
creates
a disk
image
similar
to
what
a
print
to
display
creates
on
the screen.
Remember
this,
and
you'll
be
able
to set
up your print#
list
correctly for
access
by one
or
more
input
statements.
print#
does
not
compress
the data
before writing
it
to disk;
it
writes
an
ascii-
coded image
of
the
data.
For example,
if
a
123.45
PRINT*1
>A
will
write
a
nine-byte character
sequence onto
disk:
123,a5
CENTER!
The
punctuation
in
the
print
list is
very
important.
Unquoted
commas
and
semi-
colons
have
the
same
effect as
they
do
in
regular
print
to
display statements.
For example,
if
a
=
2300
and
b
=
1.303,
then
PRINT#1
>A>B
places
the
data
on
disk
as
2300
1,303
[ENTER)
The
comma
between a and
b
in
the
print#
list
causes 10
extra
spaces
in
the
disk
file.
Generally
you
wouldn't
want
to
use
up
disk
space
this
way,
so
you
should use semi-colons
instead
of
commas.
PRINT#1
*A5B
writes the data
as:
2300
1,303
CENTER]
print#
with
numeric
data
is
quite straightforward
just
remember
to
separate
the
items with semi-colons.
print#
with
string
data requires
more
care,
primarily
because
you have
to insert
delimiters so the data
can be
read
back
correctly.
In
particular,
you must
separate
string
items with
explicit
delimiters
if
you want
to
input# them
as
distinct strings.
For example,
suppose:
A$="J0HN
Q.
DOE" and B*=
"
100-01 -001
"
Then:
PRINT*!
*
A$?B$
would
produce
this
image on
disk:
JOHN
Q*
DOE100-0I-001
[ENTER]
which
could
not
be input back
into
two
variables.
The
statement:
132

Advertisement

loading