- goto命令
goto是一个流程控制转向命令,用于控制批处理中的命令执行流程
命令格式:
goto label
。。。
:label
运行时将会跳过goto label与:label间的内容
标识符中不能含有逗号、冒号等,最大有效长度为8个字符
@echo off
goto last
echo There is a cat !
:last
echo There is a dog !
pause
goto是一个流程控制转向命令,用于控制批处理中的命令执行流程
命令格式:
goto label
。。。
:label
运行时将会跳过goto label与:label间的内容
标识符中不能含有逗号、冒号等,最大有效长度为8个字符
@echo off
goto last
echo There is a cat !
:last
echo There is a dog !
pause