Home > Archive > Fortran > March 2004 > Re: using ERR=
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Richard Maine 2004-03-29, 1:55 pm |
| "David Frank" <dave_frank@hotmail.com> writes:
> ERR= has been around for about 40 yrs ( Fortran IV ?? )
more like 25 years (Fortran 77). If you had done much programming
in the Fortran IV/Fortran 66 era, it would have been hard not to
recall the pain of having not even an end=, much less an err=.
A frequently-asked question of that era was how to read a file
when you didn't know ahead of time how many records it had.
Common approaches included putting special flag values (things
like 999 were popular) in the file.
The end= (or iostat=) of f77 was a huge improvement. Hard to
forget that one if you were there.
Of course, there might have been an err= and the like on some
particular early compilers, but if so, they weren't portable
(and I odn't recall which ones might have had such a thing).
I know how little concern portability usually is to you... but
CVF didn't exist back then either. Hey, I'm surprised that you
acknowledge that Fortran existed before CVF. :-)
--
Richard Maine
email: my last name at domain
domain: sumertriangle dot net
| |
| David Frank 2004-03-29, 1:55 pm |
|
"Richard Maine" <nospam@see.signature> wrote in message
news:m265cntvvi.fsf@vega.dsl.att.net...
> "David Frank" <dave_frank@hotmail.com> writes:
>
>
> more like 25 years (Fortran 77).
I'm pretty sure it existed in Scientific Data Systems -> Xerox Data Systems
Sigma 5/7 computers Fortran around 1968.
Anyone have it earlier than that?
| |
| glen herrmannsfeldt 2004-03-29, 3:38 pm |
| Richard Maine wrote:
> "David Frank" <dave_frank@hotmail.com> writes:
[color=darkred]
> more like 25 years (Fortran 77). If you had done much programming
> in the Fortran IV/Fortran 66 era, it would have been hard not to
> recall the pain of having not even an end=, much less an err=.
> A frequently-asked question of that era was how to read a file
> when you didn't know ahead of time how many records it had.
> Common approaches included putting special flag values (things
> like 999 were popular) in the file.
Yes, not standard until F77, though some had it as an extension
before that. The OS/360 Fortran compilers had it which would be
close to 40 years.
I just looked up a 7090 Fortran manual on the web (I never used
that one), and it seems not to have it. I was surprised to see
that the 7090 did have NAMELIST, though.
I believe many of the DEC F66 compilers had it, though I am not
sure when they started supporting it.
Most of the F77 features existed in at least some compilers
before 1977. WATFIV had CHARACTER variables back to at least
1973, along with many other F77 features.
-- glen
| |
| Bob Lidral 2004-03-30, 9:48 am |
| glen herrmannsfeldt wrote:
> Richard Maine wrote:
>
>
>
> Yes, not standard until F77, though some had it as an extension
> before that. The OS/360 Fortran compilers had it which would be
> close to 40 years.
>
> I just looked up a 7090 Fortran manual on the web (I never used
> that one), and it seems not to have it. I was surprised to see
> that the 7090 did have NAMELIST, though.
>
> I believe many of the DEC F66 compilers had it, though I am not
> sure when they started supporting it.
>
> Most of the F77 features existed in at least some compilers
> before 1977. WATFIV had CHARACTER variables back to at least
> 1973, along with many other F77 features.
>
> -- glen
I believe WATFIV (and possibly WATFOR) had both END= and ERR= but my
books for those are packed up somewhere. OTOH, CDC's Fortran compilers
used completely different syntax for these extensions as they did for
reading from and writing to memory. None of these (ERR=, END=, memory
read/write) were part of the standard until F77. Different vendors made
different choices; some chose not to add those extensions to the
language and those that did chose varying syntax for the extensions.
Most vendors with which I was familiar that did add those extensions
chose IBM-compatible syntax for what seem obvious reasons. CDC, OTOH,
chose different syntax -- I'm not sure whether they just arrived at it
independently without considering IBM, whether they had some underlying
theory they believed dictated their choice, or whether it was part of
their feud with IBM. That all seemed to change with CDC's FTN5 which
could be set to warn about all CDC-peculiar extensions and encouraged
adherence to standard (77?) syntax.
Bob Lidral
l i d r a l at a l u m dot m i t dot e d u
| |
| David Frank 2004-03-30, 9:48 am |
|
"glen herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message
news:R__9c.126126$_w.1560356@attbi_s53...
> Richard Maine wrote:
>
>
>
> Yes, not standard until F77, though some had it as an extension
> before that. The OS/360 Fortran compilers had it which would be
> close to 40 years.
>
Thanks for confirming IBM had ERR= support for IBM-360.
Since Fortran-IV was a IBM creation, its syntax was whatever IBM decided
it was.
For Richard to take the position that ERR= was an extension
prior to Fortran-77 doesnt fit the defacto IBM Fortran-IV standard facts.
| |
| glen herrmannsfeldt 2004-03-30, 12:40 pm |
| Bob Lidral wrote:
(snip)
> I believe WATFIV (and possibly WATFOR) had both END= and ERR= but my
> books for those are packed up somewhere. OTOH, CDC's Fortran compilers
> used completely different syntax for these extensions as they did for
> reading from and writing to memory. None of these (ERR=, END=, memory
> read/write) were part of the standard until F77. Different vendors made
> different choices; some chose not to add those extensions to the
> language and those that did chose varying syntax for the extensions.
WATFIV I am sure did. It was written to agree with the IBM S/360
Fortran manual. WATFOR is older than S/360, and as I found yesterday
7090 Fortran didn't have END=. Well, the manual I found for it didn't
have it, anyway. The 7090 should have been close, that was the machine
that S/360 simulators ran on when developing S/360.
> Most vendors with which I was familiar that did add those extensions
> chose IBM-compatible syntax for what seem obvious reasons. CDC, OTOH,
> chose different syntax -- I'm not sure whether they just arrived at it
> independently without considering IBM, whether they had some underlying
> theory they believed dictated their choice, or whether it was part of
> their feud with IBM. That all seemed to change with CDC's FTN5 which
> could be set to warn about all CDC-peculiar extensions and encouraged
> adherence to standard (77?) syntax.
Theory is an interesting description. The one I still wonder
about sometimes was the choice of ones complement arithmetic.
It is interesting how many of the IBM extensions to its F66 compilers
got into F77 without much change.
-- glen
| |
| Richard Maine 2004-03-30, 12:40 pm |
| glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:
[color=darkred]
Ah yes. The eof() function. On rare occasion, I still see code
that used eof() and needs to be ported. If I recall correctly
(and it is a bit dim), the big porting problem with eof() is
more than just syntax. You sometimes need some code restructuring
for the port, because eof() was a separate function, and one that
you called before the read statement to see if the next read
would hit and end-of-file, not afterwards to see whether it did.
Being a function, you could in principle, takes it's result and
store it away in a variable somewhere for later use. Not
common, but I did rarely see codes do that. That made porting
to the now-standard forms some work.
--
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
| |
| Gary L. Scott 2004-03-30, 5:45 pm |
| glen herrmannsfeldt wrote:
>
> Bob Lidral wrote:
>
> (snip)
>
>
> WATFIV I am sure did.
According to "Problem Solving and Structured Programming in WATFIV",
Friedman/Koffman, it did.
It was written to agree with the IBM S/360
> Fortran manual. WATFOR is older than S/360, and as I found yesterday
> 7090 Fortran didn't have END=. Well, the manual I found for it didn't
> have it, anyway. The 7090 should have been close, that was the machine
> that S/360 simulators ran on when developing S/360.
>
>
> Theory is an interesting description. The one I still wonder
> about sometimes was the choice of ones complement arithmetic.
>
> It is interesting how many of the IBM extensions to its F66 compilers
> got into F77 without much change.
>
> -- glen
--
Gary Scott
mailto:garyscott@ev1.net
Fortran Library: http://www.fortranlib.com
Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html
Why are there two? God only knows.
Democracy is two wolves and a sheep, voting on what to eat for dinner...
Liberty is a well armed sheep contesting the vote. - Thomas Jefferson
| |
| Bob Lidral 2004-03-31, 1:40 am |
| glen herrmannsfeldt wrote:
> Bob Lidral wrote:
>
> (snip)
>
>
> Theory is an interesting description. The one I still wonder
> about sometimes was the choice of ones complement arithmetic.
Well, what I meant by "theory" was some sort of theoretical model of the
operation for which their method made more sense than IBM's. I doubt
it's
possible at this late date to determine their motives.
I was once told that Seymour Cray said he chose one's complement for the
CDC
6600 design because he didn't understand two's complement yet. As a
simple
statement, this is patently absurd; if he did say it, he probably meant
he
hadn't internalized the associated logic design as intuitively as for
one's
complement. Then again, maybe he was joking. Anyhow, CDC was not the
only
company using one's complement in the early '60s.
> It is interesting how many of the IBM extensions to its F66 compilers
> got into F77 without much change.
I had occasion to review the draft proposed Fortran standards (full and
subset
language) in 1976. What was was that they seemed totally unwilling
to add
anything to the language that wasn't already implemented by some
vendor. In
fact, if-then-else didn't even make it into the draft and it took some
irate,
intensive lobbying to get the committee to add it then rather than
waiting for
the F90 standard. They said they agreed it should probably be added but
they
left it out initially because they couldn't decide on a syntax.
It was possible to make an educated guess as to which vendors had clout
on the
committee. In response to a (strongly worded :-)) suggestion they
increase
the allowable size of variable names to at least 30-something (as
supported by
COBOL), they said they agreed Fortran should support longer variable
names but
they didn't change it because they couldn't agree on whether to increase
the
maximum length to 8 or 10 characters.
Bob Lidral
l i d r a l at a l u m dot m i t dot e d u
|
|
|
|
|