夜未央 当前离线
列兵
@echo on set /a a = 1 set /a b= 2 set /a t = 2 echo a=%a% echo b=%b% echo t=%t% (for /l %%i in (1,1,%t%) do ( echo %%i% set entry%%i% entry%%i% = %a% + %b% +1 echo entry%%i% echo %entry%%i%% pause )) echo %entry1% echo %entry2% echo 1 pause复制代码
Batcher 当前离线
管理员
@echo off setlocal enabledelayedexpansion set a=1 set b=2 set t=2 echo a=%a% echo b=%b% echo t=%t% for /l %%i in (1,1,%t%) do ( echo %%i set entry%%i=0 set /a entry%%i=a+b+1 echo entry%%i echo !entry%%i! pause ) echo %entry1% echo %entry2% pause复制代码
TOP