Computing.Net > Forums > Windows 2000 > Dos Batch Lang. Env Var Bug

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Dos Batch Lang. Env Var Bug

Reply to Message Icon

Name: Spytalk
Date: April 10, 2009 at 21:45:38 Pacific
OS: Windows 2000
CPU/Ram: n/a
Product: N/a / N/A
Subcategory: Software Problems
Comment:

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)

BUT

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.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: April 11, 2009 at 02:55:22 Pacific
Reply:

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.

M2


0
Reply to Message Icon

Related Posts

See More


Install WGA plugin in win... Start Up Issue


Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Dos Batch Lang. Env Var Bug

Running old dos batch programs in Win2k www.computing.net/answers/windows-2000/running-old-dos-batch-programs-in-win2k/35357.html

dos batch date addition www.computing.net/answers/windows-2000/dos-batch-date-addition/63000.html

DOS batch: rename middle filename www.computing.net/answers/windows-2000/dos-batch-rename-middle-filename-/64518.html