Local variables (/var) are not automatically passed from one alias to another alias called from the first. /var's are local ONLY to the alias inwhich they are set. If you make another /var with the same name as one in the calling alias, they are separate from each other. Change a value in one alias doesn't affect the other.

Code:

alias First {
var %first = FIRST
echo -a 1.1: %first
second
third %first
echo -a 1.2: %first
}

alias second {
echo -a 2.1: %first
echo -a 2.2: $1
}

alias third {
echo -a 3.1: %first
echo -a 3.2: $1
var %first = THIRD
echo -a 3.3: %first
}



-genius_at_work