Bug with 'nX' in format statements
Joseph Comfort
Joseph.Comfort@asu.edu
Tue Aug 16 01:25:00 GMT 2005
Hi,
I have encountered a bug in format statements involving the 'nX' blank
spacing feature. Things are fine most of the time, but there are problems
if the 'nX' format appears after a '/' end-of-line mark. Here are a couple
of examples.
1) The statements
80 WRITE(6,14) N,NN1,NN2,NN3,NN4,XLABL,YLABL
14 FORMAT('0',21X,'10**',4(I3,22X),I3/5X,A5,6X,A5,7X,4('I',24X),'I')
yield (in one case)
0 10** -3 -2
-1 0 1
13278THETA SIGMA I I
I I I
The extra '13278' fills up the '5X'. The contents vary, sometimes even
losing some spacing.
2) The statements
WRITE(6,1006) (VPRN(I),I=1,14)
1006 FORMAT(' VP =',5E20.6/' RANGES',18X,4E20.6/' VN =',5E20.6/)
yield (e.g.)
VP = 0.000000E+00 0.912800E+04 0.688300E+04
0.000000E+00 0.000000E+00
RANGES 0.250000E+00 0.250000E+00 0.250000E+00
0.250000E+00
VN = 0.000000E+00 0.363000E+05 0.606500E+04
0.000000E+00 0.000000E+00
Thank you.
--
Joseph Comfort
Arizona State University
More information about the Fortran
mailing list