I tried to compile and run the program in F-World. The
first time, F-World complained that there was a module where
it expected a program. I put the program in a separate
window and then had no trouble "validating" the module and
then "running" the program successfully. No other
complaints appeared and the result was what it should have
been.
Gene Wheeler
Herff Professor of Structural Mechanics
Civil Engineering Department
The University of Memphis
[log in to unmask]
----- Original Message -----
From: "Herbert Fruechtl" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Thursday, April 17, 2003 1:15 PM
Subject: Pure (was: Problem with optional in F)
> F assumes that all functions are pure. If you change
something other than
> the function result, make it a subroutine.
>
> If "change something" has to include any type of I/O, as
the current
> definition of "pure" assumes, makes sense is a question
that has been
> discussed here. Have a look at the archives if you're
interested. The gist
> is that the compiler can't distinguish between a simple
error message and a
> permanent change in a file that may be read by a different
part of the
> program.
>
> Herbert
>
> > -----Original Message-----
> > From: Giuseppe Panei [mailto:[log in to unmask]]
> > Sent: 17 April 2003 19:13
> > To: [log in to unmask]
> > Subject: Re: Problem with optional in F
> >
> >
> > Wes
> >
> > If i remove the optional attribute from the source, I
obtain
> > the same error: "External file i/o in pure procedure
MIA"
> >
> > Giuseppe
> >
> > S.G.A.I. S.r.l. di E. Forlani & c.
> > via Mariotti 20
> > ITALY
> > 47833 Morciano di Romagna (RN)
> > Tel: 0541988277 Fax: 0541987606
> > Web: www.sgai.com Email: [log in to unmask]
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "W. J. Metzger" <[log in to unmask]>
> > To: <[log in to unmask]>
> > Sent: Thursday 17 April 2003 7:28 PM
> > Subject: Re: Problem with optional in F
> >
> >
> > > Hi, Your program works on two fortran compilers, ifc
on
> > Linux as well as
> > > F90 on HPUX. F gives errors (release 20030106 for
Linux),
> > but not the
> > > ones you cite. For me it complains about the two
write
> > statements in
> > > MIA, saying that you are doing external file i/o in a
PURE
> > procedure.
> > > I don't know why it thinks your function is PURE. In
any
> > case, when I
> > > remove the write statements, it compiles.
> > >
> > > Cheers, Wes
> > >
> > >
> > > On Thu, 17 Apr 2003, Giuseppe Panei wrote:
> > >
> > > > Dear Mr MAine
> > > >
> > > > I have attacched the source in a
> > > > f90 file
> > > >
> > > > Regards
> > > >
> > > > Giuseppe
> > >
> > > Dr. W. J. Metzger Experimental High Energy
Physics Group
> > > tel. +31-24-3653127 Faculty of Natural
Sciences
> > > +31-24-3652099 (secr.) University of Nijmegen
> > > fax. +31-24-3652191 Toernooiveld 1
> > > telex 48228 wina nl 6525 ED Nijmegen, The
Netherlands
> > > e-mail: [log in to unmask] or [log in to unmask]
> > > http://home.cern.ch/metzger/ or
http://www.hef.kun.nl/~wes
> >
>
|