Now that there's $+() and $eval, I find this method wholly more simple. Not quite as oldskool, but easier to remember late at night.
set $+(%,link.,%countsock,.total) just_a_sample
echo -a $eval($+(%,link.,%countsock,.total),2)
For older versions of mIRC, I'd recommend my /array alias:
/array {
if ( $prop == val ) return % [ $+ [ $remove($1-,$chr(32)) ] ]
return % $+ $remove($1-,$chr(32))
}
set $array(%,link.,%countsock,.total) just_a_sample
echo -a $array(%,link.,%countsock,.total).val
However to do it with brackets, I'm pretty sure this was the most accepted way.
set %link. [ $+ [ %countsock ] $+ ] .total just_a_sample
echo -a %link. [ $+ [ %countsock ] $+ ] .total
You would continue just adding [ $+ [ variable ] $+ ] around each variable, and [ $+ [ variable ] ] if you wanted to end it with a variable. If you had two variables next to eachother, it'd be slightly different too. </headache>
- Raccoon
PS. I find it interesting how the same number of brackets are used in both /set and /echo, yet mIRC evaluates the variable differently and correctly in each case. This is probably why $eval was created, because brackets may have given undesired/unpredictable results.