Well, apparently, if you leave off the %'s in front of the hi the script runs just fine but the variable is not evaluated. If you add in the %'s it does what is expected.
The conditional is very picky though.
This does not work:
Code:
DO WHILE %i != %hi (...)
And this code returns an error:
Code:
$ set done=0 & set hi=10 & set i=1 & do while %done==0 (echos %i & set /q /a i+=1 & set /q /a hi-=1 & set done=%@if[%i==%hi,1,0])
TCC: Unknown command "set"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.