Re: Recursion
- From: Richard E Maine <nospam@xxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 08:47:47 -0700
In article <3ii8stFld89eU2@xxxxxxxxxxxxxx>,
Jan Vorbrüggen <jvorbrueggen-not@xxxxxxxxxxx> wrote:
> >> So can someone tell me which F77 compilers de facto allow indirect
> >> recursion ?
> > g77
>
> But I would a lot of little things could effectively break that "de
> facto" working recursion. Put, say, a SAVEd local variable in one of
> the routines concerned, and things might work differently than you
> expect.
And some of the things that can break are far more subtle than that. I
will repeat advice I have given others on the subject, though it has
been a while.
I strongly advise against trying to use recursion with an f77 compiler
unless the compiler is *EXPLICITLY DOCUMENTED* to support recursion.
Note that heresy from comp.lang.fortran does not constitute explicit
documentation. Nor does experimentation. It is quite possible for
recursion to appear to work during testing, but fail in subtle ways in
the actual application.
People *HAVE* gotten in trouble, even after "verifying" by test that
recursion seemed to work. It is possible for the failures to just cause
incorrect results without necessarily giving other symptoms (though
admittedly, the most common symptoms are probably various forms of
crashing, which at least makes it clear that something is wrong). You
have been warned.
It is not fruitful to try to think of all the ways that things might
fail and test them all. This simply is not adequate substitute for an
explicit statement of support.
As noted by Mike Prager, specification that a compiler supports f90 or
later constitutes explicit documentation that the compiler supports
recursion (as long as the specification is that the compiler supports
f90 instead of just "some f90 features"). A lot of current f77 compilers
also support f90 or later, so this is a significant point today.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- Follow-Ups:
- Re: Recursion
- From: John Harper
- Re: Recursion
- From: David Flower
- Re: Recursion
- References:
- Recursion
- From: David Flower
- Re: Recursion
- From: Kay Diederichs
- Re: Recursion
- From: Jan Vorbrüggen
- Recursion
- Prev by Date: Re: backslash-issues
- Next by Date: Re: moduel VS parameters
- Previous by thread: Re: Recursion
- Next by thread: Re: Recursion
- Index(es):
Relevant Pages
|