EasyManua.ls Logo

Commodore 1581 - Printing a Directory; Pattern Matching

Commodore 1581
138 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...
The
command
for
the
C128
and
Plus/4
is
this:
DIRECTORY"pattern
=
filetype"
Some
examples:
LOAD"$0:*
=
R",8
and
DIRECTORY"*
=
R"
display
all
relative
files.
LOAD"$0:Z*
=
R",8
and
DIRECTORY"Z*
=
R"
display
a
sub-directo
ry
consisting
of
all
relative
files
that
start
with
the
letter
Z
(the
asterisk
(*)
is
explained
in
the
section
entitled
"Pattern
Matching."
PRINTING
A
DIRECTORY
To
printout
a
directory,
use
the
following:
LOAD'T',8
OPEN4,4:CMD4:LIST
PRINT#4:CLOSE4
PATTERN
MATCHING
You
can
use
special
pattern-matching
characters
to
load
a
pro
gram
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
ques
tion
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
withQ
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
C128
in
C64
mode).
13

Table of Contents

Other manuals for Commodore 1581

Related product manuals