Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Format statement problem
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

Report this thread to moderator Post Follow-up to this message
Old Post
David Flower
05-13-05 09:10 PM


Re: Format statement problem
In 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

Report this thread to moderator Post Follow-up to this message
Old Post
Richard E Maine
05-13-05 09:10 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Fortran archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:11 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.