strange FOR behavior
Posted: 23 Jun 2021 05:09
Hello!
In interactive cmd.exe prompt:
The result is:
I expected it to be:
What's wrong here?
Thanks!
In interactive cmd.exe prompt:
Code: Select all
cmd /V:ON
set counter=0 & for /L %K in (1,1,6) do @(set /a counter+=1 & echo !counter!)
Code: Select all
11
22
33
44
55
66
Code: Select all
1
2
3
4
5
6
Thanks!