Chapter
31
Sample Session
BASIC has powerful special keys that let you correct mistakes
without retyping the entire line. These commands are discussed
in Chapter
4,
"General Information."
Saving the Program on
Disk
You can save any BASIC program on disk by assigning it a
path-
name. The pathname tells BASIC on which disk and directory
you want to save the file and the name
of
the file. The pathname
must be enclosed in quotation marks. Pathnames must conform
to
the conventions discussed in Chapter
1,
"About BASIC for
For
example, to save the program we just wrote on Drive B, in
the directory
BOOKS
with the filename
author.bas,
use the
fol-
lowing command:
MS-DOS.
"
SAVE
"E:
\BDOKS\author.
bas"
[ENTER]
Notice that
BOOKS
is located in the root directory since
it
is
preceded by the root symbol
(
\
).
You
can also save the file with this command:
SCIVE "author
.wil"
which saves the program as
author.wi1
in the current directory
on the MS-DOS current drive.
It takes a few seconds for the computer to find a place on the
disk
to
store a program and to copy the program from memory
to the disk. When the program is saved on the disk, BASIC dis-
plays its prompt (Ok).
Loading the Program Into
Memory
If, after writing or running other programs, you want to use this
program again, you must load
it
back into memory from disk.
For example, to load the program
author.bas
from the directory
BOOKS,
type:
LOAD "B:\BOOKS\author
.ba5",R
28