Re: Getting the decimal points to line up!
- From: Michel Olagnon <molagnon@xxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Dec 2006 18:16:54 +0100
meek@xxxxxxxxxxxxxxx wrote:
In a previous article, "Ancient_Hacker" <grg2@xxxxxxxxxxx> wrote:
Okay, we're in the 21st century, we should be driving sky-cars,
wearing aluminum foil clothes, and programming in a language that makes
it easy to LINE UP THE &^$&*%$**!! decimal points on the printouts.
This is what comes out from this statement
WRITE( UNIT = StdOut, FMT = "( 1X,1P,G15.6 )", ADVANCE = 'NO'
) V
1: -1.82405 -1.38282 -0.956946 -0.538771
-0.104165 0.341845
2: -1.25098 -0.619149 -0.196250 0.255411
0.581097 0.879818
3: -0.825875 -0.198933 4.748394E-02 0.248688
0.508482 0.914057
4: -0.407584 0.225743 0.372317 0.404308
0.570299 1.05813
5: 0.119758 0.808149 0.749159 0.574465
0.594599 1.08003
6: 0.746165 1.46579 1.09562 0.707811
0.607051 0.987560
7: 1.15024 1.84483 1.30328 0.767331
0.633309 1.00111
8: 1.18195 1.78742 1.31574 0.728740
0.495854 0.856861
.. I see they may not line up on your browser. FYI they all line up
EXCEPT all the 1.xxx values, which are one column to the right.
grrrr......
In addition - the 1.xxxx numbers don't have 6 decimal places
Why would you expect them to ?
The standard states that when Gk.d is in the range where an F format is used,
d means something like "significant digits". If you want the decimal points
to line up, use an F format when you can (knowing the range), an E format
otherwise. G means "I don't care about cute printing".
.
- References:
- Getting the decimal points to line up!
- From: Ancient_Hacker
- RE: Getting the decimal points to line up!
- From: meek
- Getting the decimal points to line up!
- Prev by Date: Re: Derived type - valued function with pointer member.
- Next by Date: Getting the decimal points to line up!
- Previous by thread: RE: Getting the decimal points to line up!
- Next by thread: Re: Getting the decimal points to line up!
- Index(es):
Relevant Pages
|
Loading