Procedure for percent of a value




Hello,

I need a small procedure for calculate the percent of a value

e.g.


set srate [expr int(($tps_ok / $number_of_total_tps)*100)]

puts "\nTEST RESULT: $number_of_total_tps tps of which $tps_ok PASSED and
$tps_nok FAILED so $srate % succes rate"



doesnt look optimal and is not working except when srate = 100%. Otherwise,
I get 0%.

Any input is appreciated.

Thanks


Marcos
.