Code: Select all
call exit
Code: Select all
call exit
The "call exit" solution is not described here "https://ss64.com/nt/call.html" !!!Both options are described here: https://ss64.com/nt/call.html
It is described in the section:PiotrMP006 wrote: ↑2022-Jul-18, 6:54 amThe "call exit" solution is not described here "https://ss64.com/nt/call.html" !!!Both options are described here: https://ss64.com/nt/call.html
Code: Select all
@echo off
call :func1
echo End of main
exit /b
:func1
echo Start of :func1
call :func2
echo End of :func1
exit /b
:func2
echo Start of :func2
call :syntaxError 2> nul
echo End of :func2
exit /b
:SyntaxError
()
Code: Select all
cmd /c exit -1073741510
Code: Select all
(goto) 2> NUL