David Gabler wrote: > %lf in its bare form gives me a number such as 300.000000. What is the > best way to round the .000000 off. as to not get ANY precision OR 1 > place of precision?
The format is <total number of characters>.<digits after decimal point> So: %3.0lf should give you "300", %5.1 should give you "300.0". There are a few examples in the tutorial. Note that the decimal point is also counted: %6.2lf prints: 1.23 12.34 123.45 1234.56 12345.67 > I have been looking through the docs but can not determine the proper > way. This is part of the unix documentation. Windows users could go to google and find it rather easely: Query for "manual printf" using the "I'm feeling lucky" button gives a good pointer to start with (click "sprintf" on that page). cheers, -- __________________________________________________________________ / [EMAIL PROTECTED] [EMAIL PROTECTED] \ | work private | | My employer is capable of speaking therefore I speak only for myself | +----------------------------------------------------------------------+ | Technical questions sent directly to me will be nuked. Use the list. | +----------------------------------------------------------------------+ | http://faq.mrtg.org/ | | http://rrdtool.eu.org --> tutorial | +----------------------------------------------------------------------+ -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
