BAT 批处理中FOR语句怎么写2

来源:百度知道 编辑:UC知道 时间:2024/05/13 07:56:14
http://zhidao.baidu.com/question/53934561.html?quesup1
@echo off
for /l %%i in (0,1,5) do (
set /a n+=%%i
)
echo %n%
pause
我想问下FOR 语句中/l代表什么意思??还有其他什么“/%”问下代表什么意思!

FOR /L %variable IN (start,step,end) DO command [command-parameters]

该集表示以增量形式从开始到结束的一个数字序列。
因此,(1,1,5) 将产生序列 1 2 3 4 5,(5,-1,1) 将产生
序列 (5 4 3 2 1)。