Board logo

标题: 【求助】在for循环中的shift怎么失效了? [打印本页]

作者: xilianghe     时间: 2010-11-12 23:10    标题: 【求助】在for循环中的shift怎么失效了?

如下代码中,打印出来的都是%1的值,shift并未生效。
有明确说for循环中的shift无法实现吗?看了几个帖子,都没有给出明确的结论。
==========================
@echo off
setlocal ENABLEDELAYEDEXPANSION
for /l %%a in (1,1,9) do (
        echo %1
        if "[%1]"=="[]" goto endloop
        shift
)
:endloop

@echo on

[ Last edited by xilianghe on 2010-11-12 at 23:14 ]
作者: huahua0919     时间: 2010-11-12 23:19
不知道你的%1是从那个参数传过来的