HOW MUCH CAN
ONE DISK
HOLD?
same
thing it did
with WRITE. 5 is a positive
number.
Now for the
other blank spaces . . .
Whenever the
Computer
PRINTs a number,
it
PRINTs
one
"trailing"
blank space after it.
This
explains the
first
blank
space
after the 5 and
-
16.
How about
all the additional spaces?
Remember,
from
Getting Started With
Color
BASIC, what a
comma in the PRINT
line
does?
It causes the Com-
puter
to
PRINT your data in
columns,
inserting
spaces
between the columns.
The
Computer
will PRINT every
single one of
these
blank spaces in your
disk
file:
Cn{L>
*
OFFICE
/DAT'
PEN*- IB
PAPER*^.
JtMxL
*g
"OFFICE/
DAT
"
Count
all the
characters. Program 2 puts 42 bytes
into
"OFFICE/DAT."
Note:
Unclear about what commas do in a PRINT
line? Type some more PRINT lines
with
commas
between data items:
PRINT 1. 2, 3* H, 5, 6> 1, B HHTEffi
PRINT 'HORSE
11
, "COW'f
''RABBIT",
"OOG
I
PRINTING LESS
You
might feel that all the blank spaces
PRINT
inserts in your disk file
are
a
waste of
space.
They
are. The way to get
around this waste
is to use
semi-colons. You
might again recall, from Getting
Started
With Color BASIC, that semi-colons in a
PRINT line
compress
your
data.
Type:
"OFFICE/DAT"
file. Then type and
RUN
this
program:
PROGRAM 3
17
bytes
10 OPEN
"0"
.
*1
, "OFFICE
20
PRINT
#1
. 5i "PEN"
30 PRINT
*1
r
-lGi
"PflPEf?
40 CLOSE
*1
This is what
Program 3 PRINTs on your disk. (Use
the LINE
INPUT Program to test this, if you'd
like):
*0FFIC£/P*T
\
/
5
PEN*-1G
PAPER*
Very
efficient. Only 17 bytes. There are only three
blank
spaces
in this disk file. There is a space
before the
5
(to
indicate that it is positive) and
spaces after 5 and
-
16 (to indicate that they
are
numbers).
There are no blank spaces around the
strings.
PRINT 5! "PEN" (ENTER]
PRINT -lGi "PAPER" (EHTEB)
You can compress your data on the disk in the
same manner. Erase memory and
KILL your old
THE TRICKY PART
There
are certain
types
of PRINT lines which are
tricky.
(We
did
warn
you,
didn't we?) Type:
44