[OT] printf format specifier

2005-12-27 Thread Hugo Vanwoerkom
Hi, I thought that %02.1f would print floating points as xx.x or 0x.x but it does not. It prints x.x or xx.x. How do I ensure that there always are 2 digits before the floating point? Thanks! H -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact

Re: [OT] printf format specifier

2005-12-27 Thread Paulo Marcel Coelho Aragao
Hugo Vanwoerkom wrote on Dec, 27: [...] I thought that %02.1f would print floating points as xx.x or 0x.x but it does not. It prints x.x or xx.x. How do I ensure that there always are 2 digits before the floating point? Please allow me to recommend a very good discussion group for questions

Re: [OT] printf format specifier

2005-12-27 Thread Felix C. Stegerman
On 2005-12-27 10:58:54, Hugo Vanwoerkom wrote: Hi, I thought that %02.1f would print floating points as xx.x or 0x.x but it does not. It prints x.x or xx.x. How do I ensure that there always are 2 digits before the floating point? Try %04.1f, since xx.x has length 4, not 2. I must admit I

Re: [OT] printf format specifier

2005-12-27 Thread Hugo Vanwoerkom
Felix C. Stegerman wrote: On 2005-12-27 10:58:54, Hugo Vanwoerkom wrote: Hi, I thought that %02.1f would print floating points as xx.x or 0x.x but it does not. It prints x.x or xx.x. How do I ensure that there always are 2 digits before the floating point? Try %04.1f, since xx.x has length