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

BTM import

Discussion in 'Suggestions' started by rconn, Sep 8, 2016.

  1. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,804
    Likes Received:
    82
    BTM import

    This would expand on the GOSUB ["filename"] to import all of the defined subroutines of another BTM file. It might be similar to the Tcl 'source' command. The second BTM could be executed in the context of the first and all defined subroutines kept upon returning. They could then be called in the context of the first BTM. Optionally, the imported subroutines could be assigned a "name." prefix to distinguish them from the subroutines in the first BTM.

    [​IMG]Tim Butterfield on February 05, 2011 12:17
     
    fromano likes this.
  2. MaartenG

    Joined:
    Aug 3, 2016
    Messages:
    361
    Likes Received:
    8
    I'm not sure if I understand, but I think you can do what you want with an alias:

    Code:
    alias INCLUDE=`set %3=%1`
    
    Example:
    Code:
    INCLUDE "c:\temp\My Network Scripts.btm" AS NETWORK
    
    Calling one of your network subroutines:
    Code:
    gosub %NETWORK% :ResetConnection MyVar
    
     

Share This Page