批处理 for循环中的加法为什么没执行呢
@echooffsetlocalEnableDelayedExpansionsetaa=0for/l%%iin(1,1,5)do(set/aaa+=1echo%aa%)p...
@echo off
setlocal EnableDelayedExpansion
set aa=0
for /l %%i in (1,1,5) do (
set/a aa+=1
echo %aa% )
pause 展开
setlocal EnableDelayedExpansion
set aa=0
for /l %%i in (1,1,5) do (
set/a aa+=1
echo %aa% )
pause 展开
2013-08-22
展开全部
@echo off
setlocal EnableDelayedExpansion
set aa=0
for /l %%i in (1,1,5) do (
set/a aa+=1
echo !aa!)
pause
既然知道开启变量延迟,就要用变脸延迟的变量引用标记!
setlocal EnableDelayedExpansion
set aa=0
for /l %%i in (1,1,5) do (
set/a aa+=1
echo !aa!)
pause
既然知道开启变量延迟,就要用变脸延迟的变量引用标记!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询