It's not hard to see that /var works just fine in the command line: //var %a = 5 | echo - s $calc(5 + %a)

The problem is indeed with $base(): when negative numbers are used AND the <zeropad> parameter is specified, weird things happen. Probably somebody forgot to clear a buffer or something. Examples:

//set %a hello | echo -s $base(-5,10,4) -> works normally
//set %a hello | echo -s $base(5,10,4,7) -> works normally
//set %a hello | echo -s $base(-5,10,4,7) -> returns the correct result, but prefixed with the value of %a


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com