Re: Current Usses for Fortran ??
From: Gordon Sande (g.sande_at_worldnet.att.net)
Date: 08/25/04
- Next message: Eric K.: "Re: What do you prefer: real(8) or double precision and why?"
- Previous message: Keith Refson - real email address in signature: "Re: Question about precision"
- Maybe in reply to: John Petri: "Current Usses for Fortran ??"
- Next in thread: John B. Coarsey, P.E.: "Re: Current Usses for Fortran ??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 25 Aug 2004 13:17:10 -0300
>But, coming from C and C++, it seems to me that F77 is quite "ugly"
>language, i.e.: you need goto for loops, no dynamic memory allocation
>(so: no dynamic structures like lists, etc.).
Usually one uses DO for looping rather than GOTO, so it is not clear
what the basis of your comment is.
For the applications the ability to do major resizing parametrically
is more important than "dynamic". The parameter and include machinery
make this both understandable and doable. There are several standard
idioms for doing this smoothly. And F90 makes things even easier.
The literal use of the C dynamic allocation scheme may not always be
sensible. When the need for "dynamic structures" was present they were
more typically "allocated" out of large arrays by using subscripts
rather than pointers, just like good software engineering practice does
with C when industrial strength code is needed. Serious F90 will do
the same. Leaving only demonstration codes to use the native dynamic
allocation of either C or F90.
Some would suggest that you need to understand F77 "as it is spoke"
rather than just a quick, seemingly superficial, impression with a C++
accent.
>On the other side, looking on some F90/95 code, it seems a very cool
>language (e.g.: it has built-in matrix calculations, while in C++ you
>need external libs).
>
>So, my question is: why you use F77 and not a more modern Fortran??
One of the major reasons for using F77 was the "1980" calendar hanging
on the wall while the codes were being written. F90 or F95 postdate
many of the codes.
One might as well ask "Why didn't the first book on C describe C++ if it
is so much better?" If you go looking for the software engineering
literature on size and maintainability of codes you will find tha C++
looks pretty "ugly" compared to more disciplined languages.
>How can you manage large projects (as I think nuclear code projects are!)
>with F77?
At that scale the issue is rarely if ever the language. It is a bit hard
to find 35 year old projects that started in 1990 so you will find more
F77 than F90. But that is changing.
- Next message: Eric K.: "Re: What do you prefer: real(8) or double precision and why?"
- Previous message: Keith Refson - real email address in signature: "Re: Question about precision"
- Maybe in reply to: John Petri: "Current Usses for Fortran ??"
- Next in thread: John B. Coarsey, P.E.: "Re: Current Usses for Fortran ??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|