[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Autoexec.nt commands



** Reply to message from Harry Binswanger  on
Sat, 25 Aug 2007 00:28:01 -0400

OK, then -- we won't quibble about what you did or didn't do --
but I know darn well what happened. It is IMPOSSIBLE to fail if
you use my code, and ONLY my code, from the time you start the
DOS session. But if you issue, in addition to my code, other
manual instructions -- manual SETs etc. -- all bets are off.

> Then the "!" has no special meaning. It could be any
> symbol (or string)

Any *unreserved* symbol or string.

> because %oui%! performs a concatenation?

I suppose you could say that "y!" is a concatenation -- but only
in the sense that stringing letters together to form words is
concatenation.

> I still don't understand the shift between
> %oui% and oui. Why isn't it always %oui%?
> Is it the use/mention thing:
> %oui% refers to the value of the variable. But then
> so does oui in "set oui=Y"--or does it?

Command "SET /?". It's exactly the same in XPL: You establish
a XyWrite variable like this: . AFTER Save/Get 01
exists -- and only after -- you can refer to it as . If
you try to use  BEFORE it exists, you get an error (in
XPL, you crash; in BATCH, a nonexistent variable is simply
ignored -- treated as if you hadn't written it).

set myvar=Hello
echo %myvar%  (returns "Hello")
set myvar=Goodbye
echo %myvar%  (returns "Goodbye")
set myvar=
echo %myvar%  (returns "ECHO is on" because there ain't no such
thing as %myvar% anymore -- you just nulled it! Therefore, you
are actually just issuing an "ECHO" command, and a bare ECHO
command by itelf polls the current value of ECHO)

Use/mention is misleading in this context. It's define first,
then use. If you don't define, you can't use.

Re the IS versus PV usage, it's simple: IS is for strings, PV
is for values: "InsertString", "PutValue". Both must already
have been defined with, respectively, "SV=SetVariable" or
"SX=SeteXpression". Every computer language distinguishes
between text and math. Fundamental stuff.

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------