Re: Procedure for percent of a value
- From: Marcos Martinez Sancho <noemail@xxxxxxxxxx>
- Date: 29 Feb 2008 15:28:49 GMT
The solution is to make one of the values a floating point value, all
other numbers will be "coerced" into floating point numbers too.
Usually it's done like this:
set srate [expr int((1.0 * $tps_ok / $number_of_total_tps)*100)]
Yep. That worked. Floating point conversion was missing.
Thanks folks
Marcos
.
- References:
- Procedure for percent of a value
- From: Marcos Martinez Sancho
- Re: Procedure for percent of a value
- From: Simon Bachmann
- Procedure for percent of a value
- Prev by Date: Re: tk 8.5 vs 8.4: "font actual" differences
- Next by Date: Re: Procedure for percent of a value
- Previous by thread: Re: Procedure for percent of a value
- Next by thread: Re: Procedure for percent of a value
- Index(es):