Originally Posted By: Wims
Just find another strange thing with /var :

//var % 1 | echo -a %a \ $var(%).value

and after :

//set % 56 | var % 1 | echo 4 -a $var(%).value | unset % | echo 6 -a $var(%).value

this would echos :
2
1

and i don't know why .


Firstly, you should use the correct $var usage ($var(%var,N).value):
Code:
//set % set | var % var  | echo 4 -a $var(%,1).value | unset % | echo 6 -a $var(%,1).value

This will echo...
Code:
var
var

...and it shouldn't. It should be "var" and "set". Although /var is lacking the '=' sign in your code, I've found the issue isn't due to that, but rather to a variable name weirdness, like RusselB suggested. Anything other than '%' will work:
Code:
//set %% set | var %% var  | echo 4 -a $var(%%,1).value | unset %% | echo 6 -a $var(%%,1).value


Nevertheless, you should include the '=' sign in your /var commands, as the practice of not doing it has been proven unsafe by many times in these forums.


* cold edits his posts 24/7