mIRC Home    About    Download    Register    News    Help

Print Thread
#241010 14/03/13 11:59 AM
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
The #$ident syntax is clear for built-in identifiers, if it's a $N identifier, evaluate and keep the '#' only if $N has a value, if it's any other built-in identifier, evaluate but always remove the '#'.

Now for custom identifiers, mIRC doesn't try to evaluate the identifier itself but using the '#':
Code:
//alias $chr(35) $+ $!msl return 1 | echo -a new identifieur: #$msl | alias $chr(35) $+ $!msl
This create an alias named '#$msl' returning 1; we use the #$msl syntax, and here it goes, mIRC prefixes the whole thing with a '$' and evaluate it, ie: $#$msl

The help file doesn't state anything, as usual, but I guess it should behave the same as with built-in identifier different than $N, ie: evaluate the identifier and always remove the '#'.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #241012 14/03/13 04:34 PM
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
This is by design. The way # works was intentionally limited to very specific contexts. It is one of those additions to the scripting language that, in retrospect, was probably not a good idea as its behaviour was ambiguous and varied depending on context. It only remains for the sake of backwards compatibility. There are no plans to change how this feature works.


Link Copied to Clipboard