[Xastir] A minor miracle.....

Henk de Groot henk.de.groot at hetnet.nl
Sat May 21 12:09:37 EDT 2005


Richard E. Polivka schreef:
> Now for the C wiz's: I used 0%8.4f to supply the leading zero. I doubt 
> this is correct. What would be correct to make 88.0102 print out as 
> 088.0102?

Well, this is not correct, unless you want 100.0102 to appear like 
0100.0102 :-).

I would assume %08.4f would do the trick, the 0 indicates to prefix the 
number with zeros unitl the length is 8 positions. I'm not sure however if 
this is portable, i.e. if all *printf/*scanf implementations support it.

Kind regards,

Henk.




More information about the Xastir mailing list