|
|
Up |
  |
Author: QuadiblocQuadibloc Date: Aug 12, 2007 12:18
Many years ago, I wrote a program to draw a map of the world in any
one of several different projections.
This was back when computer time cost money, so I did not want to
contend with the overhead of a subroutine call in an inner loop.
The program, therefore, uses the assigned GO TO instead.
If you want a glance at what FORTRAN looked like in the bad old days,
http://www.quadibloc.com/comp/fort03.htm
John Savard
|
| |
| 182 Comments |
|
  |
Author: glen herrmannsfeldtglen herrmannsfeldt Date: Aug 12, 2007 12:52
Quadibloc wrote:
> Many years ago, I wrote a program to draw a map of the world in any
> one of several different projections.
> This was back when computer time cost money, so I did not want to
> contend with the overhead of a subroutine call in an inner loop.
> The program, therefore, uses the assigned GO TO instead.
I believe that was the original purpose of assigned GO TO,
as it existed even before SUBROUTINE and CALL.
Also, possibly the reason for extended range of DO.
-- glen
|
| |
| no comments |
|
  |
Author: Sjouke BurrySjouke Burry Date: Aug 12, 2007 15:56
Quadibloc wrote:
> Many years ago, I wrote a program to draw a map of the world in any
> one of several different projections.
>
> This was back when computer time cost money, so I did not want to
> contend with the overhead of a subroutine call in an inner loop.
>
> The program, therefore, uses the assigned GO TO instead.
>
> If you want a glance at what FORTRAN looked like in the bad old days,
>
> http://www.quadibloc.com/comp/fort03.htm
>
> John Savard
>
I successfully forgot about goto a least 30 years ago.
|
| |
| no comments |
|
  |
Author: nospamnospam Date: Aug 12, 2007 17:07
Sjouke Burry wrote:
> I successfully forgot about goto a least 30 years ago.
Presumably not in Fortran, then. That would have had to be F66 or
earlier. (F77 wasn't actually published until April of 1978, and it was
a while after that before compilers were out. That could count as almost
30 years, but not "at least" 30 years.) I'd have thought it pretty
awkward to program in F66 without the use of even a single goto;
possible, but darned awkward. I suppose you might have been using a
Fortran variant like Ratfor.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
|
| |
| no comments |
|
  |
Author: Sjouke BurrySjouke Burry Date: Aug 12, 2007 17:39
Richard Maine wrote:
> Sjouke Burry wrote:
>
>> I successfully forgot about goto a least 30 years ago.
>
> Presumably not in Fortran, then. That would have had to be F66 or
> earlier. (F77 wasn't actually published until April of 1978, and it was
> a while after that before compilers were out. That could count as almost
> 30 years, but not "at least" 30 years.) I'd have thought it pretty
> awkward to program in F66 without the use of even a single goto;
> possible, but darned awkward. I suppose you might have been using a
> Fortran variant like Ratfor.
>
F2/asm pdp 7
F66/asm pdp2/pdp11/microvax
F?? ibm186/286
f77 468/p??
C 468 and higher after that.
Basic/fortran/lisp at Arc risc pc(arc 310)
And I kind of disliked goto on all of them. ...
|
| Show full article (0.78Kb) |
| no comments |
|
  |
Author: mecej4mecej4 Date: Aug 12, 2007 18:04
Sjouke Burry wrote:
> F2/asm pdp 7
> F66/asm pdp2/pdp11/microvax
> F?? ibm186/286
> f77 468/p??
> C 468 and higher after that.
> Basic/fortran/lisp at Arc risc pc(arc 310)
> And I kind of disliked goto on all of them.
You may not enjoy this article, then: D.E. Knuth, "Structured
Programming with the GOTO Statement," Computing Surveys, vol. 6, 1974.
--mecej4
|
| |
| no comments |
|
  |
Author: TerenceTerence Date: Aug 12, 2007 20:48
On Aug 13, 11:04 am, mecej4 operamail.com> wrote:
> Sjouke Burry wrote:
>> F2/asm pdp 7
>> F66/asm pdp2/pdp11/microvax
>> F?? ibm186/286
>> f77 468/p??
>> C 468 and higher after that.
>> Basic/fortran/lisp at Arc risc pc(arc 310)
>> And I kind of disliked goto on all of them.
>
> You may not enjoy this article, then: D.E. Knuth, "Structured
> Programming with the GOTO Statement," Computing Surveys, vol. 6, 1974.
>
> --mecej4
|
| Show full article (0.81Kb) |
| no comments |
|
  |
Author: nospamnospam Date: Aug 12, 2007 21:32
Terence cantv.net> wrote:
> It was "Structured Programming with the COMEFROM Statement".
> I had to explain that although it was not dated April, it was however,
> a well-written spoof on this mentioned article.
The Elxsi compiler in the mid 80's actually implemented the comefrom
statement (and several variants) as a continuation of this spoof. It
wasn't documented, but I found out about it when Ralph Merkle (one of
the developers) suggested that I might be amused by looking at a certain
area in the compiler executable file. When I did so, I found a list of
strings containing mostly familliar Fortran keywords. Amidst those, I
spotted comefrom. A quick check verified that the statement actually
compiled and worked as "expected".
I later heard that the statement was pulled from the compiler after a
customer submitted a bug report (I think it was a
performance/optimization issue) related to the comefrom statement
implementation. The joke wasn't worth actually investing scarce support
resources on.
|
| Show full article (1.22Kb) |
| no comments |
|
  |
Author: glen herrmannsfeldtglen herrmannsfeldt Date: Aug 12, 2007 22:55
Terence wrote:
(snip)
> It was "Structured Programming with the COMEFROM Statement".
> I had to explain that although it was not dated April, it was however,
> a well-written spoof on this mentioned article.
The problem with COMEFROM is that it isn't so obvious if the
COME FROM is before or after the referenced statement is executed.
At least it seems less obvious than GO TO.
It seems a little convenient to COME FROM before the specified
statement is executed, in which case you can do something like:
COME FROM 123
WRITE(*,*) X,Y,Z
GOTO 123
at some convenient place, such as the end of the program, for
debugging purposes. The OS/360 Fortran G compiler has a debugging
system that works in a similar way with the AT statement.
-- glen
|
| |
| no comments |
|
  |
Author: RadSurferRadSurfer Date: Aug 12, 2007 23:45
On Aug 12, 3:18 pm, Quadibloc wrote:
> Many years ago, I wrote a program to draw a map of the world in any
> one of several different projections.
>
> This was back when computer time cost money, so I did not want to
> contend with the overhead of a subroutine call in an inner loop.
>
> The program, therefore, uses the assigned GO TO instead.
>
> If you want a glance at what FORTRAN looked like in the bad old days,
>
> http://www.quadibloc.com/comp/fort03.htm
>
> John Savard
Attempting to compile that source using gfortran 4.3.0, using an
extension of
".f" and no -std overrides, produced the following.
|
| Show full article (7.38Kb) |
| 1 Comment |
|
|
|
|