40 IF A$ =
"END"
THEN
70
50
PRINT
#
1,
A$
60 GOTO 30
70 CLOSE
80
END
1.2 Creating a SUBMIT file with Portable
WordStarâ„¢
You can create a SUBMIT file with any word processing program,
but
the ex-
ample given here deals specifically with Portable WordStarâ„¢.
In
fact the proce-
dure will be almost identical regardless
of
which word processor you use.
First
of
all you must create a new document, giving it the name.
Filename. SUB
If
you do
not
give the extension .SUB the program will not allocate the exten-
sion .SUB and the file you have created will
not
work with SUBMIT.
Now all you have
to
do
is
type in the commands you want, one
on
each line
and each followed by a carriage return:
A:FILENAME.SUB
PAGE
1
LINE
5 COL
91
L----!
----! ----! ----! ----! ----! ----! ----! ----! ----! ----! ---------R
DIR D : I
RETURN
I
STAT
D:
*.
* I
RETURN
I
ERA
D: * .BAK I
RETURN
I
PIP E: = D: * .BAS I
RETURN
I
<
<
<
<
Once you have saved this back
to
disk you will be able to execute
it
in the nor-
mal way using the SUBMIT command.
1.3 Adding Comments to SUBMIT Files
In
many cases SUBMIT files will be short and easily understood. As you use
SUBMIT more, you
will
realise how powerful a program it
is
and build up more
complex files.
It
is
often difficult to understand why they were created in a specif-
ic fashion, and also
if
someone else wishes
to
understand what you have done,
they may not be able to follow your file. This may be overcome by adding com-
ments to the SUBMIT file which are not executed, but can be found by loading
the SUBMIT file into Portable WordStarâ„¢
or
another word processor,
or
us-
ing the
TYPE
command
of
CP
1M
to
read the file. Comments can be added
3-58
by preceding the comment by a semicolon.
For
example:
DIR
D: ;first show a directory
of
disk in drive d:
STAT D: * . * ;then show the statistics
of
the files
on
the disk
ERA
D: * .BAK ;and erase all backup files
on
drive d:
3-59