This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: write recursive call


On Nov 29, 2005, at 12:04 AM, Erik Edelmann wrote:

On Tue, Nov 29, 2005 at 08:36:49AM +0100, Pierre-Matthieu anglade wrote:
Then it seems that recursive IO is not something desirable. Right?

In my opinion, recursive IO as allowed by the F2003 standard (i.e. where the "lower-level" IO is to/from internal files), is highly desirable.

I agree. And so did enough of the standard's committee in order to have it added to the f2003 standard. I don't think there has ever been significant doubt that it was desirable - that is to say useful. The only questions have been as to exactly how desirable it was, and thus how much investment it was worth, versus what the cost of implementation was estimated to be.


In times gone by, there was concern that it would cause serious implementation problems. In f77, recursion in any form was disallowed by the standard and was difficult to implement well on some architectures. Even in early f90 days, there was concern that some run-time I/O support libraries might not be able to handle it. Although the feature would have been desirable, it wasn't deemed so important as to justify requiring complete rewrite of the run-time support libraries of some extant compilers.

Today, pretty much all run-time support libraries can handle it anyway, making the cost negligable. Furthermore, the f2003 feature of user-defined derived-type I/O was going to force the issue; that feature is almost useless without recursive I/O.

--
Richard Maine                |  Good judgment comes from experience;
Richard.Maine@nasa.gov       |  experience comes from bad judgment.
                            |        -- Mark Twain


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]