Hi
I am writing a wee program to assist me in some workshop calculations. I can purchase material at a set length 5500mm, I need to know how many lengths of product I get from this length of material the product lengths are variable.
Therefore if the product length is 1900 I divide this product length into 5500. and get a result of 2.89 i.e 2 lengths with 0.89 as scrap..
However I want to show in my output the number 2 NOT 2.89 as 2 is the useful number.
I used
$F_TPL = sprintf("%01.0f",$TPL);
However, this will round up anything over 2.5 and givve the answer of 3. which is wrong. Can someone advise what I need to program to only get the figures to the left of the decimal point.
thanks