Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29407 Discussions

historical reason of existence (Fortran vs. C)

rreis
New Contributor I
770 Views
Hi all

It's well know the use of row major order for C and collum major order for Fortran. Last night I surprised myself wondering "why"? Each approach favors certain mathematical matrix operations, what was in the mind of the Fortran and C creators to decide on this? Mathematical operations, hardware implementations, OS... ? Can someone shed some light?

Many thanks,
0 Kudos
4 Replies
TimP
Honored Contributor III
770 Views
Quoting - rreis
It's well know the use of row major order for C and collum major order for Fortran. Last night I surprised myself wondering "why"? Each approach favors certain mathematical matrix operations, what was in the mind of the Fortran and C creators to decide on this? Mathematical operations, hardware implementations, OS... ?
quoting from
http://wiki.tcl.tk/11224
"ALGOL is not in the ancestry of FORTRAN...
ALGOL is in the ancestry of C,...
if I interpret some publications by Tony Hoare correctly, ALGOL was deliberately designed to not be related to the FORTRAN version of the time."

If Hoare says some of the Algol committee decisions were based on the desire to be different from Fortran, who am I to disagree? The Algol committee was much larger and less practically focused than the earlier Fortran work. Algol was complicated enough that I never saw a full implementation, even though the hardware had the benefit of another decade of development.
Several of the best original papers are collected in "programming languages, a grand tour," Horowitz, ed. 1983,85,87 (although the Fortran coverage consists of the Brainerd f77 article).
0 Kudos
Steven_L_Intel1
Employee
770 Views
I recall reading that the Fortran choice of column-major order was due to the way the IBM 704 did addressing.
0 Kudos
jimdempseyatthecove
Honored Contributor III
770 Views
I recall reading that the Fortran choice of column-major order was due to the way the IBM 704 did addressing.

I think it had to do more with managing card decks than anything else. You could add and remove attributes (dimension) of a data set without sort/merge of card decks (and remove collate to unsort/seperate decksafter run).

Jim Dempsey
0 Kudos
Steven_L_Intel1
Employee
770 Views
I did a Google search of this topic and it brought up a book "Programming Language Pragmatics" which includes this footnote:

"Correspondence with Frances Allen, an IBM fellow and Fortran pioneer, suggests that column-major order was originally adopted in order to accommodate idiosyncracies of the console debugger and instruction set of the IBM 704."
0 Kudos
Reply