The difference is that var will evaluate simple math expressions like:

//var %a = 1 + 1 | echo -a %a

To prevent this, the n flag is used with set, and the l flag is used to make it local.

//set -ln %a 1 + 1 | echo -a %a


Gone.