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

WAD UNFUNCTION "/L" and "/G" Switches

Discussion in 'Support' started by cgunhouse, Feb 3, 2016.

  1. cgunhouse

    Joined:
    Dec 2, 2008
    Messages:
    209
    Likes Received:
    2
    It appears that the "/L" and "/G" switches don't work for UNFUNCTION:

    [10] (3964340K) c:\jpsoft\startup > UNFUNCTION /L yesterday
    TCC: (Sys) The parameter is incorrect.
    "L"
    Usage : UNFUNCTION [/G /L /Q /R file...] [(function...) function...]
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    WAD - the /L and /G switches are obsolete (and were removed several versions ago). I'll update the help to reflect that.
     
  3. cgunhouse

    Joined:
    Dec 2, 2008
    Messages:
    209
    Likes Received:
    2
    FUNCTION /L /R Functions.ini
    Don't generate an error and actually doesn't seem to do anything, while:

    UNFUNCTION /L /R Functions.ini

    Generates an error message for both the "/L" and "/G" switches.

    The switches for FUNCTION should generate an error too.
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    That is not correct. /L and /G in FUNCTION (and ALIAS) switch TCC between local & global lists.

    In UNALIAS and UNFUNCTION, /L and /G are pointless, because TCC already knows what kind of list you're using.
     
  5. cgunhouse

    Joined:
    Dec 2, 2008
    Messages:
    209
    Likes Received:
    2
    So then the "/L" and "/G" switches don't work with the "/R" switch, you have to do something like:

    FUNCTION /G
    FUNCTION /R Global_Functions.ini
    FUNCTION /L
    FUNCTION /R Local_Functions.ini

    All TCC processes would see the Functions from Global_Functions.ini but only the TCC processes that loaded the Local_Function.ini, locally would see them.

    To clear all the global functions:

    FUNCTION /G
    UNFUNCTION *
     
  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    No -- you can't have both a global list and a local list. You have to choose one or the other. Each individual TCC session can choose what it wants, but your example would result in only a local list being used by the current TCC session, and no global list available for anybody.
     
  7. cgunhouse

    Joined:
    Dec 2, 2008
    Messages:
    209
    Likes Received:
    2
    Seem to work for me,

    Session 1:

    FUNCTION /G
    FUNCTION /R Global_Functions.ini

    Globals for all TCC sessions

    Session 1:

    FUNCTION /L
    FUNCTION /R Local_Functions.ini

    Only for the local session, but I still see the Global as well.

    If I switch to another session a type:

    Session 2:

    FUNCTION
    Only see the Global Functions from Global_Function.ini

    If load the Locals to session 2 and then do an UNFUNCTION *

    Session 2:


    FUNCTION /L
    FUNCTION /R Local_Functions.ini
    FUNCTION

    I see both Global and Locals like Session 1, still LOCAL list

    Session 2:

    UNFUNCTUION *

    Everything is gone, both Local and Global.

    Session 1:

    FUNCTION

    Both the Globals and Local show up

    Session 3:


    FUNCTION

    Just the Globals

    Load both the Globals and Locals back into Session 2:

    Session 2:

    FUNCTION /L
    FUNCTION /R Local_Functions.ini

    FUNCTION /G
    FUNCTION /R Global_Functions.ini
    FUNCTION

    Both Globals and Locals

    Session 2:
    FUNCTION /G
    UNFUNCTION *
    FUNCTION

    Both are gone.

    Session 3:

    FUNCTION

    Globals are gone and no locals were ever loaded.

    Session 1:

    FUNCTION

    Both Global and Local still there,

    Session 1:

    FUNCTION /G
    FUNCTION

    Session 2 and 3:

    FUNCTION

    They're back, both the Globals and Locals, weird stuff. I can sort of see how it works but it is still weird. But setting Session 1 to Global it pushed all the FUNCTION in session 1 to the other sessions as Globals.
     
  8. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    No -- you cannot see the global memory in Session 1, because the view has been unmapped. If you're running SHRALIAS or you've started another TCC session before doing the FUNCTION /L, then you can see it in new sessions (because they've retained a map), but it has no connection any longer to session 1.
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    WAD -- you do NOT see the global and local list, you see only the local list. When you do a FUNCTION /L, it copies everything from the global list to the local list and unmaps the global list. Yoiur FUNCTION /R just adds more to your local list.

    No - the local is gone; the global was gone when you did the FUNCTION /L.[/QUOTE]
     
  10. cgunhouse

    Joined:
    Dec 2, 2008
    Messages:
    209
    Likes Received:
    2
    This all started with FOLDERMONITOR, I had so many TCC processes firing off in such a short period of time, things were acting very weird and FUNCTION/UNFUNCTION was one of the problems. This is one of the reason I mentioned semaphores would be a nice addition to Take Command. I have built a semaphore using a FUNCTION and it now seems to work, now that I understand how FUNCTION and UNFUNCTION work. Thanks for the help in understanding FUNCTIONS.
     

Share This Page