Code Comments
Programming Forum and web based access to our favorite programming groups.Try D16.8. (I dislike G format, but that's a personal opinion) The 8 is the number of digits after the decimal point, and the 16 is the total length output. You need 8 extra spaces: Possible lead minus sign 0
Post Follow-up to this messageIn article <1115912400.992619.8840@g49g2000cwa.googlegroups.com>, "David Flower" <DavJFlower@AOL.COM> wrote: > Try D16.8. .... > D > + or - > Three digit exponent If you have found a compiler that gives output like this from a D16.8 format, then you should submit a bug report to the vendor for violating the Fortran standard. Yes, the field width of 16 would allow enough room for this, but you need to do more than just check whether there is enough room. The standard specifies what goes into that field. In particular, you will *NOT* get both the exponent letter and a 3-digit exponent (which was exactly the question being asked); if you get that, the compiler is broken. See other replies for how to write a format specifier that will achieve this effect (namely e16.8e3 or variants thereof, the e3 on the end being the critical part). -- Richard Maine | Good judgment comes from experience; email: my first.last at org.domain | experience comes from bad judgment. org: nasa, domain: gov | -- Mark Twain
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.