WAD More SET /A woes

May 20, 2008
11,437
99
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
11,437
99
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.
 
Similar threads
Thread starter Title Forum Replies Date
Charles Dye More help nits Support 0
L detach /Q is more yappy than advertised Support 3
D TCC has much more elegant ways for usebackq. What ways? Support 12
vefatica Make FFIND a bit more friendly? Support 14
vefatica More on the help Support 12
nikbackm WAD More Windows 10 woes Support 8
fromano How to? Everything finding directories with 2 or more files in them Support 3
vefatica WAD More on ACTIVATE Support 4
vefatica More on IFTP Support 7
mfarah More on pdir's options: /(fq) Support 5
Dan Glynhampton Documentation v15 help: More mailto: links Support 2
Dan Glynhampton Documentation v15 help: More odd mailto: links in the help Support 8
C Looking for files with more than 1 period Support 2
vefatica More on the installer Support 5
J DebugMonitor - More mystical than magnets? Support 6
D "Learn More" button on home page not working Support 3
J Colors in tcmd (one more try) Support 1
M More SafeChars type issues... Support 4
Y More v13 weirdness Support 4
S More HELP nits Support 5
vefatica WINDOW (and more closing TCC woes) Support 15
Jay Sage More on Problem with Tabbed Toolbar Support 0
Roedy more.com stops working Support 1
dcantor More date-related help items for V11 Support 0
Jay Sage More Problems with TCTOOLBAR Support 0
vefatica @IPNAME (and more) Support 2
M More file-renaming problems involving commas... Support 0
R Reading an Unicode file with more than 8191 lines Support 1
V Set path permanently from within TCC? Support 3
S Debugger keeps breaking with no break point set. Support 1
Joe Caverly Set a batch variable (%1 - %n) when TCC is executing a batch file Support 5
R How to? Set default application in a special folder Support 4
A How to? Set up SMTP password in TCC-RT Support 1
vefatica SET /A and multidimensional array. Support 1
M How to set Path variable for non-executable file extensions in 4DOS Support 8
D Need to set Take Command font size when switching to high DPI display Support 0
P "Set" command behavior - a bug? Support 3
M How to? Set the ribbon titles to mixed case Support 1
X How to set %_INIREAD result to variable Support 5
M WAD Set statements in () causes problems Support 8
M How to? How to set a default TITLE for newly opened tab? Support 2
M Fixed Set "VAR=VAL" format causes problems Support 12
vefatica SET /A var=expression=digits Support 3
cxxl Set encoding for batch file Support 4
B TCC 21.01.50 Problem with ALIAS /r and SET /r Support 2
vefatica SET /A var\=...? Support 10
dcantor Documentation SET /T: missing from heading Support 0
fpefpe Documentation Set /v Support 4
vefatica What's SET /Z? Support 1
R Fixed set /r has stopped working in build 35 Support 4

Similar threads