Re GOTOmsdos:
通过规范的程序设计,可以实现在Bat中Goto或Call到自身或其他Bat的标签。
主调的结构
...
:: Call 型调用自身
call %0 : labelname
...
:: Goto 型调用自身
%0 : lablename
...
:: Call 型调用其他Bat
call bat_name : labelname
...
:: Goto 型调用其他Bat
bat_name : lablename
...
被调的结构
@echo off
if "%1"==":" goto %2
...
:labelname
...
goto end
...
:end
Re: GOTOmsdos:
Through standardized program design, it is possible to achieve Goto or Call in Bat to its own or other Bat labels.
Structure of the calling side
...
:: Call - type call to itself
call %0 : labelname
...
:: Goto - type call to itself
%0 : lablename
...
:: Call - type call to other Bat
call bat_name : labelname
...
:: Goto - type call to other Bat
bat_name : lablename
...
Structure of the called side
@echo off
if "%1"==":" goto %2
...
:labelname
...
goto end
...
:end