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

Re: Autoexec.nt commands



** Reply to message from Harry Binswanger  on
Sun, 26 Aug 2007 02:10:57 -0400


> But I'm still confused as to the syntax conventions here (if you want to
> humor my ignorance):
>
> if %oui%==y set oui=Y
>
> I'd expect it to be:
>
> if %oui%==y set %oui%=Y
>
> Hmmm. Maybe it's because you use: "set oui=Y" not "set %oui%=Y"

It's because you don't SET (establish) the result, you establish
the variable. The variable is named "oui"; the result (the
value|content) is "%oui%". BATCH has a different syntax for the
variable itself, and for the content of the variable. I don't
know of any language where you can write to the content directly
-- it doesn't make common sense. You write to the variable if
you want to change the content. You can't say "4=3", but you
can say "variable OUI, which formerly equalled 4, now equals 3".

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