This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [patch] intrinsic.texi: 13 down
On Fri, Aug 25, 2006 at 03:22:07PM -0700, Brooks Moses wrote:
> Daniel Franke wrote:
> >Tested info, dvi and html targets on x86.
> >
> > * intrinsic.texi: added documentation for ACOSH, AND, ASINH,
> > ATANH, CHDIR, FGET, FGETC, FPUT, FPUTC, GETCWD and OR intrinsics,
> > removed inadvertently introduced doc-stubs for EQV and NEQV,
> > corrected some typographical errors.
>
> Overall, this looks good to me. I do have a few comments, though.
>
> Hexadecimal constants in the code examples should probably be entered in
> as close to a standard form as possible -- i.e., Z'F', not 'F'X. I am
> not sure whether it's worth going completely with standard code and
> putting them in DATA statements rather than assignments, but it may be.
I agree with Brooks on this point. We should be encouraging
the use of standard conforming Fortran.
> The FGETC and related functions are described as relating to files in
> stream mode, and referring to "Stream I/O". Is this the same stream
> mode and "Stream I/O" as what's in the Fortran 2003 standard (and
> recently added to gfortran), or is this different? In particular, I
> note that the OPEN statements in the code examples do not specify
> ACCESS='STREAM'. If this is not the same thing, this should probably be
> reworded to avoid confusion.
The FGETC function and friends are for g77 compatibility. These
allowed "stream I/O" in Fortran 77 programs, and are essentially
independent of F2003 Stream I/0. We should probably add a sentence
or two to encourage the use of F2003 Stream I/O over the nonstandard
intrinsics.
"The FGETC intrinsic routine is provided for backwards compatibility
with GNU Fortran 77. @command{Gfortran} provides the Fortran 2003
Stream facility. Programmers should consider the use of new stream
IO feature in new code for future portability."
Feel free to hack on the above and add a cross reference if possible.
--
Steve