Welcome!

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

SignUp Now!

WHICH vs. reality?

May
12,846
164
If there are both (1) a plugin variable function and (2) a user-defined function with the same name, WHICH will identify the plugin one but TCC will use the user-defined one.

Code:
v:\> which @icmp
@icmp is a plugin variable (SYSUTILS)

v:\> echo %@icmp[jpsoft.com]
36

v:\> function icmp foo

v:\> which @icmp
@icmp is a plugin variable (SYSUTILS)

v:\> echo %@icmp[jpsoft.com]
foo
 
What about `WHICH /A` ?
1. /A apparently doesn't work for variable functions.
2. It still doesn't tell me which TCC will use.

Code:
v:\> echo %@icmp[jpsoft.com]
50

v:\> function icmp foo

v:\> which /a @icmp
@icmp is a plugin variable (SYSUTILS)

v:\> echo %@icmp[jpsoft.com]
foo
 
WHICH is a little different now.

Code:
v:\> which @icmp
@icmp is a user-defined variable function (foo)
@icmp is a plugin variable (SYSUTILS)

v:\> echo %@icmp[jpsoft.com]
foo

So I wonder:

1. Is it WAD that it shows both without "/A"?
2. When it shows more than one, is the first guaranteed to be the one TCC will use?
 
Back
Top