$ type exit1.cmd @echo off setlocal call :a echo a=%ERRORLEVEL% call :b echo b=%ERRORLEVEL% endlocal exit /b :a exit /b "1" :b exit /b 1
結果
$ exit1 a=0 b=1
なんでやねん
$ type exit1.cmd @echo off setlocal call :a echo a=%ERRORLEVEL% call :b echo b=%ERRORLEVEL% endlocal exit /b :a exit /b "1" :b exit /b 1
結果
$ exit1 a=0 b=1
なんでやねん