This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH] Fix FMT= with CHARACTER arrays (PR fortran/39865, take 3)
- From: Walter Spector <w6ws at earthlink dot net>
- To: tprince at computer dot org, fortran at gcc dot gnu dot org
- Date: Thu, 14 May 2009 06:26:59 -0700
- Subject: Re: [PATCH] Fix FMT= with CHARACTER arrays (PR fortran/39865, take 3)
- References: <4A0BACC3.8050200@earthlink.net> <4A0BC4B2.30001@sbcglobal.net>
Tim Prince wrote:
...
I checked the manual for the f66 compiler I learned on, and nowhere is the
fmt= specifier mentioned. Nor does that F77 appendix C mention the
possibility of using fmt= with Hollerith. Thus my belief that fmt= was
not in the standard until f77, when Hollerith had already been eliminated.
I am not sure why the silly comment when I am being sincere in trying
to clarify the situation. As you well know, FMT= is simply an optional
keyword, yes, introduced at f77, and there should be no difference in how
things work with/without it. (Outside the obvious positional flexibility
when keywords are used.)
Thinking about it a bit more, one other problem with extending a compiler
to support scalar Hollerith formats is that it would cause an ambiguity
with 'assigned formats':
integer myfmt
...
assign 100 to myfmt
write (6,myfmt)
...
100 format (12hHello world!)
Since 'assign' is used with scalar integers, this would be a different
case than supporting array elements as an extension.
IMHO, compilers shouldn't support any extensions in the Hollerith
department (e.g., Hollerith constants in arith expressions) unless
some sort of under-documented compiler option is specified.
Walter