mIRC Homepage
Posted By: Tat Easy access Dynamic varables. - 31/03/03 07:27 AM
It's pretty easy to setup a dynamic varable. Although, without built in support for them you end up with stuff like:
Code:
% [ $+ ping. [ $+ [ $nick ] ] ]
or
[ % $+ [ ping. $+ [ $me ] ] ]


I suggest allowing a command like %(ping. $+ $nick) to be equal to [ % $+ [ ping. $+ [ $me ] ] ]. Also allowing stuff like $(Join. $+ $network) so that everything in the () directly concatinated is evaluated then checked against varables or aliases.
Posted By: starbucks_mafia Re: Easy access Dynamic varables. - 31/03/03 09:09 AM
$eval($+(%,Join.,$network),2) already works. OK so it's two identifiers but still it allows the code to be grouped into parentheses. And of course to get the variable name you simply remove the surrounding $eval().
Posted By: qwerty Re: Easy access Dynamic varables. - 31/03/03 03:33 PM
You came pretty close to reality: $($+(%,Join.,$network),2) is the same as $eval($+(%,Join.,$network),2). Any other way to evaluate dynamic vars would be incompatible with the scripting language and would break scripts. For example, currently, you can have a variable named %(ping. Changes are worth breaking existing scripts only if they enhance functionality considerably, imo.
Posted By: Tat Re: Easy access Dynamic varables. - 31/03/03 04:12 PM
Drat, you're right. I was assuming '(' & ')' weren't usable for varables. Oh well.
© mIRC Discussion Forums