EasyManua.ls Logo

Commodore 1570 - Page 21

Commodore 1570
132 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...
PRINTING A DIRECTORY
To get a printout
of
a directory, use the following:
LOAD"$"
,8
OPEN4,4:CMD4:LIST
PRINT#4:CLOSE4
PATTERN MATCHING
You can use special pattern-matching characters
to
load a program from a partial
name
or
to provide the selective directories described earlier.
The two characters used in pattern matching are the asterisk (*) and the question
mark (?). They act something like a wild card in a game
of
cards. The difference between
the two is that the asterisk makes all characters in and beyond its position wild, while the
question mark makes only its own position wild. Here are some examples and their
results:
LOAD"
A
*"
,8
loads the first file on disk that begins with an A, regardless
of
what
follows
DLOAD"SM?TH"
loads the first file that starts with SM, ends with TH, and one
other character between
DIRECTORY"Q*"
loads a directory of files whose names begin with Q
LOAD"*",8
is
a special case. When
an
asterisk
is
used alone
as
a name, it matches
the last
file
used (on the C64 and
Cl28
in C64 mode).
LOAD
"0:*",8
loads the first file on the diskette (C64 and
Cl28
in C64 mode).
DLOAD
"*,,
loads the first
file
on the diskette (Plus/4 and C128
in
Cl28
mode).
SPLAT FILES
One indicator you may occasionally notice on a directory line, after you begin saving
programs and files, is an asterisk appearing just before the
file
type
of
a
file
that is 0
blocks long. This indicates the file was not properly closed after it was created, and that it
should not be relied upon. These
"splat"
files normally need to be erased from the
diskette and rewritten. However,
do
not use the SCRATCH command
to
get rid
of
them.
They can only be safely erased by the VALIDATE or COLLECT commands. One
of
these should normally be used whenever a splat
file
is
noticed on a diskette.
All
of
these
commands are described in the following chapters.
There are two exceptions
to
the above warning: one
is
that VALIDATE and
COLLECT cannot be used on some diskettes that include direct access (random)
files
(Chapter 7). The other
is
that
if
the information
in
the splat
file
was crucial and can't be
replaced, there is a way to rescue whatever part
of
the
file
was properly written. This
option is described in the next chapter.
13

Related product manuals