1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Documentation GOSUB quick help

Discussion in 'Support' started by Charles G, May 1, 2012.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,017
    Likes Received:
    0
    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. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    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.
     
  3. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    I have no idea what you're asking for here -- both the quick help and the full help document "filename".
     
  4. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
    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.
     
  5. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    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.
     
  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    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.
     
  7. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,017
    Likes Received:
    0
    Sorry for my delayed reply but David was / is correct in what I meant. And thank you Rex too.
     

Share This Page