Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Documentation GOSUB quick help

Apr
1,794
15
TCMD version 13 -

[D:\]gosub /?
Execute a subroutine in the current batch file.
GOSUB ["filename"] label [args]
[D:\]

Since it allows a "filename" now - it might be worth changing the help to reflect it....
 
And just to be a stickler about it, the word "current" isn't accurate, either.

And the phrase "another part of the batch file" is no longer accurate, either, both because it could be another part of another batch file and since a subroutine can call itself (up to 22 levels "deep" in TCC 13.04.61) the phrase "another part" isn't accurate, either.
 
I believe Charles is saying that "Execute a subroutine in the current batch file" is not a good summary of what GOSUB does since the subroutine need not be in the current batch file.
 
Adding the capitalized words in "Execute a subroutine in the current OR THE SPECIFIED batch file" would concisely cover the current operation of the GOSUB command.
 
I believe Charles is saying that "Execute a subroutine in the current batch file" is not a good summary of what GOSUB does since the subroutine need not be in the current batch file.

The existing description is technically accurate, because the subroutine is executing in the context of the current batch file. But I'll reword it a bit so as to remove the potential confusion.
 
Sorry for my delayed reply but David was / is correct in what I meant. And thank you Rex too.
 

Similar threads

Back
Top