mIRC Home    About    Download    Register    News    Help

Topic Options
#262025 - 23/12/17 03:12 AM $v1 / $ifmatch being inherited from identifier
Raccoon Offline
Hoopy frood

Registered: 18/02/03
Posts: 2594
//alias apple if (boat) return $!upper($1-) | if (carrot) echo -a $v1 - $apple($v1) - $v1 | alias apple

alias apple { if (boat) return $upper($1-) }

//if (carrot) echo -a $v1 - $apple($v1) - $v1

Returns: carrot - CARROT - boat
Expected: carrot - CARROT - carrot

I wasn't aware that $v1 was global, transcending scope, like a global variable.

(Also, $result is always empty. $result should contain CARROT.)
Well. At least I won lunch.
Good philosophy, see good in bad, I like!

#262026 - 23/12/17 03:22 AM Re: $v1 / $ifmatch being inherited from identifier [Re: Raccoon]
FroggieDaFrog Offline
Hoopy frood

Registered: 16/04/10
Posts: 910
Loc: USA
$v1/v2 has always been global. Due to Khaled's consistency in not wanting to break backwards compatibility, I doubt that will change.

$result always being empty is a bug.
I am SReject
My Stuff