From: Allamarein on
On 26 Giu, 17:32, dpb <n...(a)non.net> wrote:
> Ron Shepard wrote:
> > In article <i04te1$or...(a)news.eternal-september.org>,
> >  dpb <n...(a)non.net> wrote:
>
> >> Allamarein wrote:
>
> ...
>
>
>
>
>
> >>> MODULE  STATISTICS
>
> >>>            CONTAINS
>
> >>>            REAL FUNCTION  SUM(X)
> >>>                    IMPLICIT  NONE
> >>>                    INTEGER ::  N
> >>>                    REAL :: RES=0.0
>
> > The above is another mistake in this code.  This is an
> > initialization which is done once (e.g. at the beginning of the
> > program, or during compile time), not an assignment that is
> > performed each time the function is invoked.
>
> > As written, this code will sum up the elements of all the array
> > arguments that it is ever given throughout a program run.  There
> > might be reasons you would want to do this, but probably not for
> > this function, right?
>
> >>    REAL, INTENT(IN) :: X(:)
> >>>                       N = SIZE(X)
>
> >           RES = 0.0
>
> > This is what you probably want here, a regular assignment statement
> > that is executed just before the do loop every time the function is
> > invoked.
>
> ...
>
> Yes; I saw that later and intended to comment on it...glad somebody did
> since I forgot about it.
>
> --

Thanks to everybody.
With the wisdom of hindsight my allocating system was rubbish.
Now I can go on (probably I will look for a book on amazon)
From: Gib Bogle on
Allamarein wrote:

> Anyway I provided myself with 'Fortran 90/95 Explained' by
> M.Metcalfand and J.Reid.
> Is it a good book?

It is frequently recommended.
Good luck with your entry into the world of Fortran. You will not regret it.
From: Allamarein on
On 27 Giu, 04:25, Gib Bogle <g.bo...(a)auckland.no.spam.ac.nz> wrote:
> Allamarein wrote:
> > Anyway I provided myself with 'Fortran 90/95 Explained' by
> > M.Metcalfand and J.Reid.
> > Is it a good book?
>
> It is frequently recommended.
> Good luck with your entry into the world of Fortran.  You will not regret it.

Thanks.
Now I want to find Chapman's book.
From: Ian Bush on
On Jun 27, 9:59 am, Allamarein <matteo.diplom...(a)gmail.com> wrote:
> On 27 Giu, 04:25, Gib Bogle <g.bo...(a)auckland.no.spam.ac.nz> wrote:
>
> > Allamarein wrote:
> > > Anyway I provided myself with 'Fortran 90/95 Explained' by
> > > M.Metcalfand and J.Reid.
> > > Is it a good book?
>
> > It is frequently recommended.
> > Good luck with your entry into the world of Fortran.  You will not regret it.
>
> Thanks.
> Now I want to find Chapman's book.

Metcalf, Reid and Cohen is, in my opinion, about the best into text
book out there. However rather than Chapman I would get "The Fortran
2003 Handbook: The Complete Syntax, Features and Procedures"
by Jeanne C. Adams, Walter S. Brainerd, Richard A. Hendrickson,
Richard E. Maine, Jeanne T. Martin and Brian T. Smith as a reference.
See

http://www.amazon.co.uk/Fortran-2003-Handbook-Complete-Procedures/dp/1846283787/ref=sr_1_6?ie=UTF8&s=books&qid=1277643364&sr=1-6

Alternatively if you're only interested in Fortran 95 I would see if I
can pick up a copy of the equivalent book for that standard - it will
probably be second hand,

Ian
From: viper-2 on

> I am sure that I good papery reference book is irreplaceable.
> Would you suggest me some titles?
> Anyway do you know some useful links?
> Tutorials step-by-step would be welcome.

Yes, the dead tree versions do have advantages - for one thing,
they're better for your eyesight. Fortran 95/2003 explained comes
highly recommended in this group.

Electronic editions have their own strengths too! Finding exactly what
you want is fast and easy because your computer will let you search
and copy, so here are a few of my links that I found useful last year
when I was learning re-Fortran:

http://www.star.le.ac.uk/~cgp/f90course/f90.html#tth_sEc2.3

http://www.pcc.qub.ac.uk/tec/courses/f90/stu-notes/F90_notesMIF_1.html

http://www.nsc.liu.se/~boein/f77to90/f77to90.html

http://www-solar.mcs.st-and.ac.uk/~steveb/course/course.html

http://www.stanford.edu/class/me200c/tutorial_90/

http://wwwasdoc.web.cern.ch/wwwasdoc/WWW/f90/f90.html

Clive Page maintains a list of resources at:
http://www.star.le.ac.uk/~cgp/fortran.html

Michel Olagnon also has a list here:
http://www.ifremer.fr/ditigo/molagnon/fortran90/engfaq.html#3.5

and this is yet another resource page:
http://www.personal.psu.edu/faculty/h/d/hdk/fortran.html


You really do have to google, in the archives for this group and on
the web generally, to find what you want. Good luck!

agt

--
Freedom - no pane, all gaiGN!

Code Art Now
http://codeartnow.com
Email: agt(a)codeartnow.com