Given the following code:
@Echo off
ECHO Start
ECHO Calling SUB_A
CALL :SUB_A
ECHO Calling SUB_B
CALL :SUB_B
:SUB_A
ECHO In SUB_A
GOTO:EOF
:SUB_B
ECHO In SUB_B
GOTO:EOF
ECHO End
I expect this output:
Start
Calling SUB_A
In SUB_A
Calling SUB_B
In SUB_B
End
But I get this:
Start
Calling SUB_A
In SUB_A
Calling SUB_B
In SUB_B
In SUB_A
What am I doing wrong here?