[PATCH] fortran/28213 -- Fix Hollerith in IO list
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon Jul 10 19:08:00 GMT 2006
On Wed, Jul 05, 2006 at 11:52:14AM +0800, Feng Wang wrote:
>
> > >
> > > Finally, the behavior I implemented is consistent with NAG's
> > > Fortran 95 compiler.
>
> ifort is consistent with mine :-)
>
> > atlas:kargl[205] cat z.f
> > program z
> > data i/3horz/
> > data x/3horz/
> > print *, i, x
> > print *, 3horz
> > print '(A3)', i
> > end
>
> [wf@WFPC bug]$ ifort z.f
> [wf@WFPC bug]$ ./a.out
> 544895599 2.1213687E-19
> orz
> orz
>
> And IBM XL Fortran V10.1 online documents say:
> (http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=/com.ibm.xlf101l.doc/xlflr/typeless_lit_constants.htm)
>
> When you use a typeless constant in any other context, the constant assumes the
> default integer type, with the exception of Hollerith constants. Hollerith
> constants assume a character data type when used in the following situations:
> 1. An H edit descriptor
> 2. A relational operation with both operands being Hollerith constants
> 3. An input/output list
>
Feng,
In thinking about this some more, I have come to agree that
your original patch is probably a "good enough" solution.
Please commit your first patch.
--
Steve
More information about the Fortran
mailing list