Be aware of two issues with your code here:
1)
/var is for local variables. They are only valid in the event or alias you have called, not outside of it.
2) Unless you put the '
loop' code directly into the 'Aliases' section, it's probably not going to work.
Now, these things being said, using a 'goto' is very old school, and using a 'while' loop is strongly recomended:
set %x hello
set %y
set %z $me
alias loop {
var %count = 1, %top = $var(0)
while (%count < %top) {
echo -a Item %count = ' $+ $var(%count) $+ '
inc %count
}
}
Now, I can't remember what properties
$var() takes, but I think there's a .item and/or .value.