![]() GdP Software |
Contact Shop |
Products Faq |
The CALL statement allows you to have a subroutine inside your .bat file. Unlike the GOTO statement that jumps to a label in your .bat file, the CALL statement remembers where it came from, and can return there.
ECHO before call Call :Sub ECHO Back from sub GOTO :EOF :Sub ECHO in sub GOTO :EOF
The output from the previous example would be:
before call in sub Back from sub
To finish a subroutine, and thereby returning to the statement following the CALL, you need to "GOTO :EOF". EOF is short for "End Of File", so executing the statement GOTO :EOF will quit your .bat file. If the "GOTO :EOF" is done while a CALL is active, it will not quit your .bat file but return to the statement following the active CALL.
All trademarks are the property of their respective owners.
Please send comments, questions, suggestions and so forth to Support.
Copyright © GdP Software 2003-2005, All rights reserved.