EasyManua.ls Logo

Commodore PC 10 - Page 223

Commodore PC 10
494 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...
Set
Purpose:
Sets
one
string
of
characters in
the
environment
equal
to
another
string
for later use in programs.
Syntax:
[-~
set
[string = [string
II
Comments:
You should use
the
set
command
only
if
you
want
to
set
values
for programs you have written.
When
MS·
DOS
sees a
set
command, it inserts
the
given string
and
its equivalent into a
part
of
memory
reserved for
the
environ-
ment.
If
the
string already exists in
the
environment, it is
replaced
with
the
new
setting.
If
you
specify just
the
first string,
set
removes any previous set-
ting
of
that string from
the
environment.
Or
if
you use
the
set
command
without
options,
MS·
DOS displays the
current
environ-
ment
settings.
When
batch processing, you
can
also use
the
set
command
to
define
your
replaceable parameters by
name
instead
of
by
number. For example,
if
your
batch
file contains
the
statement
"type %file%
",
you
could
use
the
set
command
to
set
the
name
that MS-DOS will use for that variable. In
the
following command,
for example,
set
replaces
the
%file%
parameter
with
the
filename
taxes.
86:
set
file=taxes.86
To change
the
replaceable
parameter
names, you
don't
need
to
edit
each
batch file. Note also that
when
you use
text
(instead
of
a
number)
as a replaceable parameter,
the
name must
be
ended
by a
percent
sign.
The
set
command
is especially useful in
the
autoexec.
bat
file,
because it lets you automatically
set
strings
or
parameters
when
you
start MS·DOS. See
Chapter
4,
"Batch Processing," for
more
information about
the
autoexec.
bat
file.
MS-DOS Commands
851
Set
[1].
Defining replaceable
parameters

Table of Contents

Related product manuals