Question about Hollerith formatting

Feng Wang wf_cs@yahoo.com
Tue Sep 13 11:04:00 GMT 2005


--- Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de> wrote:

> Richard E Maine wrote:
> >>That's one way to resolve the ambiguity, I would have preferred not 
> >>allowing
> >>scalars in Hollerith formatting at all -- it seems much more logical 
> >>to me.
> > 
> > 
> > But the question is not about what seems logical. If on were designing 
> 
> For extensions beyond what the standard specifies, I think "logical" is a
> valid criterion.

Logical is ambiguous itself.

> Admittedly, I wasn't aware that any of the Hollerith
> formatting modes was ever specified in any standard when I wrote that.
> 
> > a Hollerith facility anew, one would do many things very differently. 
> > Mostly one wouldn't do Hollerith at all. I sincerely hope that the only 
> > reason for even talking about Hollerith is for legacy codes. The issue 
> > here is about an ambiguity between 2 deleted features, both of which 
> > have many quirks and oddities. Some of the oddities of statement label 
> > assignment are pretty, well, odd... and if you don't think so, then I 
> > hope you haven't been implementing statement label assignment because 
> > the oddities are crucial to a fundamental implementation issue for 
> > statement label assignment.
> 
> I completely agree.
> 
> > Anyway, back to Hollerith format specification.
> > 
> > The f77 standard specifies in Appendix C (the only place where 
> > Hollerith is treated in f77, it having been banished from the normative 
> > body of the standard) that
> > 
> >    "A format specification may be an array name of type integer, real, 
> > or logical."
> 
> Thanks, that's exactly what I thought makes sense.  I've checked pgf's
> documentation, and they use a very similar wording, so I presume that one
> could consider their extension undocumented.
> 
> Feng Wang, is the use of single array elements really something that is
> needed
> for real codes?

I checked and found none of my programs use. I will send a mail to newsgroup
comp.lang.fortran to see if others need this. But obviously, elements of
character array should be allowed. So from this point, to keep consistency, we
allow elements of other type is also logical. And I handle them just like
character array elements: get the address of the element and the length is the
rest of the array not the single element, convert them to string expression.

> I guess we'll have to keep it, but we could move it to
> STD_LEGACY or -fbutt-ugly (if we ever get that) or whatever.

If no real programs use like this, I don't object to disallow it. And I also
have no time to do this now. So I file a new bug report and add Tobi to the CC
list. See:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23852



Best Regards,
Feng Wang

--
Creative Compiler Research Group,
National University of Defense Technology, China.


	

	
		
_________________________________________________________
Yahoo! Mail - now with Autocomplete that helps fill email addresses.
http://mail.yahoo.com.sg



More information about the Fortran mailing list