PDA

View Full Version : Re: [LF] Why use FORTRAN?


Lahey Support
08-15-2003, 01:33 AM
John Segedy wrote on August 13:

>Why Use FORTRAN?

> H. The language should have exhibited staying power, and not
> be the just latest fad. (Does anyone in the real world
> program in Algol or Pascal, formerly darlings of the
> computer science set, anymore?)

The use of the Algol 60 behind the iron curtain was completely
different. Due to the COCOM list, the mainframe computers made
in the Western World were not accessible for the people living
in the Eastern World. In 1963 -- the year of publication of the
Revised Report on the Algorithmic Language Algol 60 -- the
topical version of the Fortran was still the Fortran II (i.e.
the standard "Fortran 66" had not been formulated yet).

Two mainframe computers of type Razdan-3 arrived in Hungary
from Armenia (!) in 1967. One of them was used by all the Hungarian
universities while the other one was used by the companies of the
Hungarian electricity network. The power of these computers was LOWER
than the power of the first IBM PC. Nevertheless, the high level
programming language was the Algol 60, not a simple Basic.

Comparing the Algol 60 (from 1963) and Fortran 90 (from 1990)
one can observe among others two important features.

(1) In Algol programs, due to the "block-structure" one could define
local variables, local procedures, at any point of the program,
theoretically in any level. (The compiler limit for the Razdan-3
was 72.) This option was formulated in Fortran 90 up to the
SECOND level. Example:
program levels
write (*,*) 'main level'
call sublevel()
stop
contains
subroutine sublevel()
write (*,*) 'sublevel'
call sub_sublevel()
return
contains ! FATAL ERROR -- Internal procedures may not be nested
subroutine sub_sublevel()
write (*,*) 'sub_sublevel'
return
end subroutine sub_sublevel
end subroutine sublevel
end program levels

(2) The Algol 60 allowed the use of the recursive procedures
that was introduced THIRTY years later by Fortran 90. Example
from the Algol 60 textbook by D. D. McCracken (1962):
integer procedure factorial(n);
if (n=1) then factorial:=1
else factorial:=n*factorial(n-1);

As illustration to the possibilities of Algol programming,
I'd like to mention only one of my tasks. To test the operation
of a district heating plant with the unusual heat flow chart
suggested by me, I wrote a Monte-Carlo program to simulate
the plant. (The results validated my design. The plant has
been in operation for thirty years, without any problems with
its control.)

One of the follow-up of the Algol 60 is the Simula 67. (It contains
the complete Algol 60 language to describe the behaviour of the
OBJECTS defined in the programs. OOP in 1967 - many years before C!)
The programs written in this language can be run on PC-s, as well.

I use Fortran because my engineering problems are related to the
nuclear technology (see my message on July 3). Nevertheless, sometimes
the Algol would be the better tool for solving certain problems.

Regards,
E. J. Szondi

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
SZONDI, Egon Janos [address removed]
Institute of Nuclear Techniques http://www.reak.bme.hu/~szondi
Budapest University
of Technology and Economics
H-1521 Budapest, Hungary Tel: ++36-1 463-1563
Muegyetem rkp. 9. Fax: ++36-1 463-1954
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

----------------------------------------------------------
To unsubscribe, send to [address removed] the following
as the first and only line of the message body:
unsubscribe fortran
----------------------------------------------------------