Chapter
1
I
About
BASIC
for
MS-DOS
Pathnames
BASIC lets you specify
pathnames
to
access disk files just as
MS-
DOS does.
A
pathname is enclosed in quotation marks and may be
a maximum
of
63
characters. It contains the following information:
“[d:
I[pathlfilename[.extl”
The drive is specified by
d:
and may be either A, B,
C,
or
D.
If you
omit
d:,
BASIC uses the current drive.
Path
gives the directory path for
filename.
The directory names are
separated by a backslash
(
\
1.
If you omit
path,
BASIC uses the
current directory.
Filename
specifies the name of the file being accessed. Filenames
are
1
to
8
characters long. If a filename is more than
8
character,
BASIC truncates it
to
8
characters.
Ext is an optional extension
to
the filename. Use extensions
to
help
distinguish types of files. Extensions are always preceded by a pe-
riod
(.I
and are
l
to
3
characters long. If you omit the extension,
BASIC assumes
.bas.
Here are some common extensions:
.bas for BASIC programs
.txt for ASCII text
.dat for Data files
.obj for Object code
.re1 for Relocatable code
.src for Source code
Directory Paths
Some commands, such as CHDIR, MKDIR and RMDIR use a direc-
tory path (dirpath) instead
of
a pathname. The only difference be-
tween the
two
is that a dirpath does not include a filename:
“[d:
]path”
The drive identifier
(d:)
andpath are described above.
12