Documentation GOSUB quick help

Apr 2, 2011
1,628
15
55
North Carolina, USA
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.
 
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....

I have no idea what you're asking for here -- both the quick help and the full help document "filename".
 
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.
 

Similar threads