I could not find a good example on this because examples in books are scarce as 
hen's teeth. search engines ignore the * character and maybe even interpret it 
like a wildcard. :-/ so examples on the web are out.

#include <stdio.h>
int main(void) {
    double d=1234567890.123456789;
    int width=7,precision=3;//tried 3 and 9
    printf("width=%d, precision=%d, d=%*.*f\n", width, precision, d);  
//generates forever loop of spaces, program hangs.
    return 0;
}

I need to use this. but it seems broken. it just locks up generating spaces no 
matter what I put in for numbers. I don't think that's right.


 
-------------
Jim Michaels
[email protected]
[email protected]
http://RenewalComputerServices.com
http://JesusnJim.com (my personal site, has software)
---
IEC Units: Computer RAM & SSD measurements, microsoft disk size measurements 
(note: they will say GB or MB or KB or TB when it is IEC Units!):
[KiB] [MiB] [GiB] [TiB]
[2^10B=1,024^1B=1KiB]
[2^20B=1,024^2B=1,048,576B=1MiB]
[2^30B=1,024^3B=1,073,741,824B=1GiB]
[2^40B=1,024^4B=1,099,511,627,776B=1TiB]
[2^50B=1,024^5B=1,125,899,906,842,624B=1PiB]
SI Units: Hard disk industry disk size measurements:

[kB] [MB] [GB] [TB]
[10^3B=1,000B=1kB]
[10^6B=1,000,000B=1MB]
[10^9B=1,000,000,000B=1GB]
[10^12B=1,000,000,000,000B=1TB]
[10^15B=1,000,000,000,000,000B=1PB]
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to