WAD More SET /A woes

May 20, 2008
10,680
83
Syracuse, NY, USA
v24:
[/code]
v:\> set /a zz=10/7
1

v:\> echo %zz
1[/code]

v20:
[/code]
g:\tc20> set /a zz=10/7
1.4285714286

g:\tc20> echo %zz
1.4285714286[/code]
 
May 20, 2008
10,680
83
Syracuse, NY, USA
I cannot think of any reason to use the tortured SET /A syntax if you're *not* using CMD.

It saves a lot of typing (which I'm not good at) especially when the expression that must be repeated on the right side is complicated.
Code:
set /a a[%i,%j]+=%t
set a[%i,%j]=%@eval[%a[%i,%j]+%t]

@EVAL is faster though ... and (now) more capable.