Board logo

标题: 请问怎样退出for循环!! [打印本页]

作者: caucfeiyu     时间: 2007-4-17 10:38    标题: 请问怎样退出for循环!!

请问怎样退出for循环,如:

@echo off
for /f "tokens=1,2,3,4,5,6 delims=-" %%i in ("Hello-World-this-is-a-good-job!") do  if 条件成立 echo %%i,%%j,%%k,%%l,%%m,%%n else 退出for循环
在执行循环时,不满足某个条件,则退出for循环,怎样才能退出来呢!
作者: GOTOmsdos     时间: 2007-4-17 10:51
用 GOTO
作者: caucfeiyu     时间: 2007-4-17 10:58
goto end
:end
exit
太感谢了!又学到了知识了!