Dos Batch Lang. Env Var Bug

April 10, 2009 at 21:45:38
Specs: Windows 2000, n/a
I would like to see someone explain this IN DETAIL.

DOS command prompt in Windoze 2000:

set var2=

set /a var1=%var2%+1

(produces a 'missing operand' error)


set /a var1=+1

of course sets var1 equal to 1 with no error

In a windoze command prompt an environment variable that
doesn't exist is suppose to resolve to null in an expression.

Not sure if this is repeatable in XP
or true DOS. Please comment thanks.

See More: Dos Batch Lang. Env Var Bug

Report •

April 11, 2009 at 02:55:22
It's surely not repeatable in DOS because there is no set /a in DOS.

If at first you don't succeed, you're about average.


Report •
Related Solutions

Ask Question