Procedure for percent of a value
- From: Marcos Martinez Sancho <noemail@xxxxxxxxxx>
- Date: 29 Feb 2008 14:51:53 GMT
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
.
- Follow-Ups:
- Re: Procedure for percent of a value
- From: Simon Bachmann
- Re: Procedure for percent of a value
- From: Neil Madden
- Re: Procedure for percent of a value
- From: Andreas Leitgeb
- Re: Procedure for percent of a value
- From: tomk
- Re: Procedure for percent of a value
- Prev by Date: Re: tk 8.5 vs 8.4: "font actual" differences
- Next by Date: Re: tk 8.5 vs 8.4: "font actual" differences
- Previous by thread: Vista inconsistency(?)
- Next by thread: Re: Procedure for percent of a value
- Index(es):