Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

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

Dec
233
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...]
 
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.
 
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.

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.
 
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 *
 
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.
 
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.
 
Session 1:

FUNCTION /L
FUNCTION /R Local_Functions.ini

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

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.
 
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

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.

Session 2:

UNFUNCTUION *

Everything is gone, both Local and Global.

No - the local is gone; the global was gone when you did the FUNCTION /L.[/QUOTE]
 
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.
 
Back
Top