vefatica May 12,845 164 Jun 11, 2019 #1 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]
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]
rconn Administrator May 13,015 192 Staff member Jun 11, 2019 #2 WAD (compatibility) - try it in CMD.EXE.
vefatica May 12,845 164 Jun 11, 2019 #3 Aha CMD! It's a shame. It worked better from (at least) v8 up to v20.
rconn Administrator May 13,015 192 Staff member Jun 11, 2019 #4 I cannot think of any reason to use the tortured SET /A syntax if you're *not* using CMD.
vefatica May 12,845 164 Jun 11, 2019 #5 rconn said: I cannot think of any reason to use the tortured SET /A syntax if you're *not* using CMD. Click to expand... 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.
rconn said: I cannot think of any reason to use the tortured SET /A syntax if you're *not* using CMD. Click to expand... 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.