【批处理】shift用法举例
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 @echo off 2 set sum=0 3 call :sub sum 1 2 3 4 4 echo sum=%sum% 5 pause 6 7 :sub 8 set /a %1=%1+%2 9 shift /2 10 if not "%2"=="" goto sub 11 goto :eof
1 @echo off 2 set sum=0 3 call :sub sum 1 2 3 4 4 echo sum=%sum% 5 pause 6 7 :sub 8 set /a %1=%1+%2 9 shift /2 10 if not "%2"=="" goto sub 11 goto :eof