Documentation GOSUB quick help

#1
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....
 
#2
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.
 

rconn

Administrator
Staff member
May 14, 2008
10,740
97
#3
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".
 

rconn

Administrator
Staff member
May 14, 2008
10,740
97
#6
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.