Как сделать, чтобы доступные, быстрые ярлыки ("goto | anyth |" | "call | anyth |" | ..) из цикла "for", сценарии, в пределах 1 файла сценария
Мои попытки:
for /F %%a in ("t1") do (
if "%%a"=="" (
call :fsc
) else (
echo "n t"
if "%%a"=="t1" (
call :fsc
) else (
call :fsc1
)
)
:fsc
echo t1
rem how? to end the :fsc (without the addition it continuing to "pause")
rem (answer: not possible in bash, this example's way can't be used because "goto" breaks out ?all scopes)
:fsc
echo t2
)
pause
и другой
for /F %%a in ("t1") do (
if "%%a"=="" (
call :fsc
) else (
echo "n t"
if "%%a"=="t1" (
call :fsc
) else (
call :fsc1
)
)
)
:fsc
echo t1
goto :eof
:fsc1
echo t2
goto :eof
::why? after the "for" ends, execution doesn't coming here
:: (answer: all after "for" executed( including "goto :eof"))
pause
mintextlimitmintextlimitmintextlimitmintextlimitm