Re: Help for a FORTRAN N00b
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Thu, 10 May 2007 10:08:35 -0700
e p chandler <epc8@xxxxxxxx> wrote:
OK. The original code is completely illegal.[GOTO the continue statement of a DO loop from outside the loop counting
1. Where did this idiom come from?
as a jump around the loop]
As I mentioned before, some compilers implemented that. I couldn't say
whether it was an intentional feature or just how things happened to
work out in conjunction with failure to diagnose the condition.
I guess it made sense to someone. Not to me. You have to have a bunch of
special-case exceptions to define it at all. (For example, don't even
think of what it might mean if the terminal statement is anything other
than a CONTINUE - so you have to special-case it as applying only to
CONTINUE). I even recall a vendor rep (from SGI) vociferously arguing
here that the standard specified that. Turns out that he was using his
own guess as to what the range of a DO loop meant rather than anything
from the standard. That was long ago, but it stuck in my mind, partly
because I wondered how the vendor could have gotten a basic definition
so badly wrong and still gotten the compiler to work on much of anything
at all, even on legal codes. I suppose that the rep in question wasn't
the person who implemented the stuff.
2. Who wrote the compiler that actually compiled it to running code?
I forget, but I've definitely seen code do that. I'm thinking it might
have been from a DEC compiler, just because one code that I recall
fixing came from someone who regularly used DEC machines. But that's
just a guess.
Hmm. Since I recall an SGI rep arguing that this was standard, that
probably means there was once an SGI compiler that did it.
3. I thought that inverting a matrix was a "bad idea" anyway. (Yes APL
does have it.)
Often. Not always. It is usually considered a "bad idea" if the
objective is to solve a linear system. But there are cases where the
inverse is actually what is wanted. One example I know of is the Cramer
Rao bound (an estimate of the error covariance). In any case, that's a
question about numerical methods rather than Fortran; I'll not further
pursue that at the moment.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- Follow-Ups:
- Re: Help for a FORTRAN N00b
- From: Steve Lionel
- Re: Help for a FORTRAN N00b
- References:
- Re: Help for a FORTRAN N00b
- From: thogy
- Re: Help for a FORTRAN N00b
- From: Richard Maine
- Re: Help for a FORTRAN N00b
- From: e p chandler
- Re: Help for a FORTRAN N00b
- From: Richard Maine
- Re: Help for a FORTRAN N00b
- From: Ron Shepard
- Re: Help for a FORTRAN N00b
- From: glen herrmannsfeldt
- Re: Help for a FORTRAN N00b
- From: e p chandler
- Re: Help for a FORTRAN N00b
- Prev by Date: Re: Help for a FORTRAN N00b
- Next by Date: Commutative law in addition in XL Fortran
- Previous by thread: Re: Help for a FORTRAN N00b
- Next by thread: Re: Help for a FORTRAN N00b
- Index(es):
Relevant Pages
|