This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[PATCH,committed] Re: PARAMETER use within FORMAT statements (Typos in example?)
On Mon, May 31, 2010 at 01:24:46PM -0700, Steve Kargl wrote:
> On Mon, May 31, 2010 at 01:15:43PM -0700, Peter Willis wrote:
> > Hello,
> >
> > I have a secondary question regarding the example(s)
> > provided at that link.
> >
> > I am wondering if there are typos in the examples.
> >
> > In the first solution the variable 'F' is allocated
> > as CHARACTER(LEN=20). That variable is never used
> > by the WRITE statements below. Which is the correct
> > variable 'F', 'FMT', or 'FM'?
> >
> > I am guessing that all those 'F'-words should be
> > 'FMT'. ;)
> >
>
> Yes. I see about fixing the typos.
>
I've committed the following patch to fix the issue.
2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
* fortran/gfortran.texi: Fix typos in description of variable-format-
expressions.
Index: gfortran.texi
===================================================================
--- gfortran.texi (revision 160085)
+++ gfortran.texi (working copy)
@@ -1872,12 +1872,12 @@ with the following:
@smallexample
c Variable declaration
- CHARACTER(LEN=20) F
+ CHARACTER(LEN=20) FMT
c
c Other code here...
c
WRITE(FMT,'("(I", I0, ")")') N+1
- WRITE(6,FM) INT1
+ WRITE(6,FMT) INT1
@end smallexample
@noindent
--
Steve