Mail Archives: djgpp/1997/10/04/00:30:41
Ian Chapman <ichapman AT nortel DOT ca> wrote:
> Matthew,
> the %path% I've not seen that in the dos manual where does
> this % % use come from I was curious the first time I installed
> djgpp.
Inside a batch file (and ONLY inside a batch file; this does not -ever- work
at the command line) anything beginning with % is interpreted specially. As
you probably know, %1 through %9 are the arguments, %0 is a sort of argv[0].
Another way % can be used is to show an environment variable. For example, if
you have an environment variable:
FOO=xyzzy
then a batch file containing the line:
echo %FOO%
will produce the output 'xyzzy'. What is being done with PATH is, a new
directory is added to the beginning, and the rest of the old path gets
tacked on the end. If, previously, you had:
PATH=C:\DOS;C:\WINDOWS;C:\FOO;C:\BAR;C:\XYZZY
then after the 'PATH=C:\DJGPP;%PATH%' it would look like this:
PATH=C:\DJGPP;C:\DOS;C:\WINDOWS;C:\FOO;C:\BAR;C:\XYZZY
late\fw
--
[- firewind -]
[- email: firewind AT metroid DOT dyn DOT ml DOT org (home), firewind AT aurdev DOT com (work) -]
[- "You're just jealous because the voices talk to -me-." -]
- Raw text -