Hi,
Can anybody tell me how I can truncate an int.
I use now this:
sprintf "%.0f", ($num_records / $num_rows);
If I have a value like 17.6 I will always get 18. If i have 17.4, I'll get 17. So it rounds.
Is there a way that I will just get 17, no mather what the decimal is.
Thanks for any response.
Tijs Programming is like sex: one mistake and you have to support it for the rest of your life.
Can anybody tell me how I can truncate an int.
I use now this:
sprintf "%.0f", ($num_records / $num_rows);
If I have a value like 17.6 I will always get 18. If i have 17.4, I'll get 17. So it rounds.
Is there a way that I will just get 17, no mather what the decimal is.
Thanks for any response.
Tijs Programming is like sex: one mistake and you have to support it for the rest of your life.