When using the CALL command to call a label in a batch script, and you end the sub-routine with GOTO:eof, what happens from there? Does it return back to where the sub-routine's CALL is located? Or does it continue on after the location of the call script?
For example:
ECHO It's for my college fund.
CALL :OMGSUB
ECHO *runs away and cries like a little girl*
:OMGSUB
ECHO Your mom goes to college.
GOTO:eof
ECHO *picks up jewelry box*
After GOTO:eof which line will it echo next?
GOTO:eof
withexit /b
. Also,ECHO Your mom goes to college.
will be executed afterECHO *runs away and cries like a little girl*
, which may not be intended. The solution would be to add anexit
afterECHO *runs away and cries like a little girl*
. – Doran