I ran into problem in TCL. I can add and multiply two integer variables. This works just fine:
set hdsuc [expr {$hdsuccess * $hdcount}]
set hdsuc [expr {$hdsuccess + $hdcount}]
But, for some reason, I am not able to divide them. Following does not work at all:
set hdsuc [expr {$hdsuccess / $hdcount}]
The above returns 0. Could there some issue with the settings?
It’s doing integer division. You need to convert one of the arguments to a double. e.g.: