Command Line

 


Use keywords to find the content you
are looking for within the WinOne site.

Command GOSUB

Function:

Jump to another part of a batch program and continue executing the batch program from that point onwards until a RETURN command is found. Execution of the batch program will then return to the next command following the original GOSUB command.
Syntax:
GOSUB label
labelSequence of characters.
Note:
  • The label must also appear on its own line elsewhere in the batch program, preceded by a colon, for example :-
    GOSUB subproc
    ...
    ...
    :subproc
    ...
    ...
    RETURN
  • GOSUB's can be nested a maximum of 8 levels.
  • Also see command GOTO and Batch Programs.

Copyright © 1995-2012 Better Computers Australia Pty Ltd, All Rights Reserved
WinOne is an Australian registered trademark
Visit our HTPC Store.