Talk:Fortran

From Wikipedia, the free encyclopedia

This article is within the scope of WikiProject Computer science, which aims to create a comprehensive computer science reference for Wikipedia. Visit the project page for more information and to join in on related discussions.
B rated as B-Class on the assessment scale
High rated as High-importance on the assessment scale

Contents

[edit] FORTRAN -vs- Fortran

Stephen Gilbert: you changed Fortran to FORTRAN, saying Fortran is normally spelt in all caps. If I recall correctly, older versions of Fortran (FORTRAN IV, FORTRAN 74) are spelt will all caps, whilst the new version (Fortran 90) is spelt in normal mixed case. (I may be wrong though.) -- Simon J Kissane

FORTRAN 77, Fortran 90, and Fortran 95 is IMHO the correct spelling. I am not sure, if there is a blank in between {FORTRAN | Fortran} and {77 | 90 | 95}. I've tried to find some "official" Fortran Website, but failed. Is there one? -- Tobias Hoevekamp

See http://www.j3-fortran.org (ANSI committee) and http://www.nag.co.uk/sc22wg5/ (ISO committee).

I found http://www.faqs.org/faqs/fortran-faq/ and it seems to support the Fortran spelling.

The FORTRAN 77 standard, an ANSI standard (X3.9-1978) adopted by ISO, spells it in all caps. The Fortran 90 standard, an ISO standard (ISO/IEC 1539-1:1991) adopted by ANSI, and all subsequent standards, spell it with only an initial capital. BTW, the number in the "common name" is related to the year the development committee submitted it for publication, while the year in the document number is the year the standardization organization actually got around to publishing it. Van Snyder 20:19 August 22 (UTC)

[edit] article merge

Someone added new material to Fortran programming language presumably without realising that Fortran existed. I have merged and moved it all to Fortran programming language. --drj

Great job. Fatalis 00:47, 21 January 2007 (UTC)

[edit] links

Thanks for the entry. In addition it would be nice to have some commented links to well known Fortran compilers including free ones and perhaps a tiny example like Euclid's algorithm (gcd). Well and a note about libraries would be fine as well. -- HJH

[edit] article title

I wonder why the historical all-caps spelling FORTRAN is used in the page title, instead of the modern spelling (which appears to be a redirect to the historical name). Shouldn't the modern form be the primary one?

Could somebody try to move this page to Fortran? For some reason 'Move this Page' doesn't work for me right now. --mav

Problem with the InnoDB database upgrade .. will be fixed soon .. --Eloquence 11:28 Jan 25, 2003 (UTC)
Fixed. --Brion 11:34 Jan 25, 2003 (UTC)


[edit] Code sample

Isn't the Code Sample a bad example in that it's an indefinite loop?

Yes it is. I'm changing it.
I added a code sample. Keep it, modify it, trash it if you like. The "Hello World" sample just seemed too simple to me. As some anonymous soul has noted, yes, it is for MS-DOS. You can tell how old the code is by the fact that it calls for a file on the "A:" drive. This program was written about 1983. Yeah, it's old, but so is Fortran.--Wcrowe 02:08, 16 Sep 2004 (UTC)

[edit] embedded spaces in identifiers in Fortran?

Does modern Fortran allow embedded spaces in identifiers like the older FORTRAN IV did? - Bevo 19:07, 26 May 2004 (UTC)

Reply: Not in the free source form introduced in Fortran 90. The old fixed source form has been retained for backwards compatibility but should not be used in new code IMO.

[edit] Open Source Compiler

Thanks to The Recycling Troll for adding the Open Watcom compiler link. I tried it out, and changed the sample code so that it will compile with it. The original code was over 20 years old and was written for a compiler which hasn't been around for a long time. Hopefully this will help any newbies who want to try the code for themselves.Wcrowe 19:28, 19 Oct 2004 (UTC)

thanks ;-) Metacarpus 14:13, 11 Apr 2005 (UTC)

[edit] comments on IBM compiler

I wonder if the comments appearing on the relative popularity of the IBM and Waterloo compilers are correct. I would like to see a source.

[edit] Fortran 95 code sample needed

I [Beliavsky] think the current Fortran 77 code sample should be replaced with one in Fortran 90 or 95.

I think the whole article should be rewritten from the point of view of the current language, and everything else moved to a "history" section, which is similar to the structure of articles about natural languages, countries, etc. Grayscale
Most of the code out there is written in Fortran 77, I'm sure. For example PYTHIA has existed since the '70s but still adheres to Fortran 77. - mako 21:08, 2 Jun 2005 (UTC)
I (Eric Salathe) just cleaned up the example code and added another to better reflect contemporary Fortran programming. The existing example contained syntax, like statement lables, that are deprecated. I also added an additional example showing dynamic allocation and a simple matrix operation. Incidently, I mentioned gfortran with a link, but no article seems to exist currently.
Regarding comment above "Most of the code out there is written in Fortran 77": Yes and no. Most new models are written in Fortran90. This includes the most computationally intensive code out there, climate and weather models. The easiest examples to look at would be CCSM (the US Community Climate System Model) <http://www.ccsm.ucar.edu/models/ccsm3.0/> and WRF (Weather and Research Forecasting) model <http://www.wrf-model.org/index.php> for which code is publicly released.

[edit] Soviet FORTRAN

Maby a few words could be added to "history" section, like, for example, that FORTRAN was used to program US spacecraft, moon landers, Space shuttle and even that during cold war, Soviet Union had their own version of FORTRAN compiler for their early supercomputers. FORTRAN was definitively a very strategically important programming languege during the cold war, but there is no mention of that here.

feel free to add what you know, after all, it's a wiki, isn't it? Metacarpus 14:07, 11 Apr 2005 (UTC)

There was almost certainly design software related to the space shuttle written in Fortran, and maybe even some operational ground data-handling software, but AFAIK all of the flight software was written in HAL-S ("S" for "Shuttle").

[edit] Legal rights to the term FORTRAN

Is the word "Fortran" copyrighted or can it be freely used? There seems to be a company named "Fortran company" that offeres various Fortran languege related services and products. Do they have any exclusive rights over Fortran languege?

194.249.64.198 (and apparently other addresses in the same general area)

? Is there a problem?

IANAL. AFAIK IBM do not assert copyright (or trademark) over the name FORTRAN or Fortran, therefore there is no problem. KymFarnik 00:10, 15 April 2006 (UTC)

[edit] Standard joke

Is it really needed? I can understand its inclusion, but I don't think it deserves an entire section to itself without at least some explanation. Including it elsewhere with some background would be a better plan IMO. --Philip Hazelden 12:49, 24 August 2005 (UTC)

Is it needed. No. Is Wikipedia needed? No. Are you or I needed? No.
But a little levity goes a long way towards making the Wikipedia reader's life an enjoyable experience. And really, it is the absolutely standard Fortran joke, a clear way to separate the newbies from the cognoscenti.
I think it's presented in the article exactly the way it should be: One quick shot with no prelude or aftermath.
But then again, I'm probably biased because I'm the one who put it there. ;-)
Atlant 13:02, 24 August 2005 (UTC)
I'd have to agree with Philip. Although the joke is fairly funny, it doesn't deserve a section devoted to it. -- Michael B

The `standard joke' isn't clear to a casual reader. Thoughts? GChriss 21:28, 1 February 2006 (UTC)

Agreed. Wikipedia should be equally accessable to non-programmers too. I suggest that it be removed. michaelb 15:56, 8 February 2006 (UTC)
I've been using FORTRAN since 1971, as for non programmers - they are reading this to find out what Fortran is, the idea of real and integer is very important (as the two basic machine data types (string after all is just a bunch of integers)). I vote the joke stands as is. KymFarnik 00:01, 15 April 2006 (UTC)

[edit] IBM FORTRAN G and H compilers

What was the difference between the IBM FORTRAN G and H compilers? Bubba73 16:22, September 4, 2005 (UTC)

While I can't answer authoritatively, nobody has responded, and I have used both at a time when they were both in use and supported. The G compiler was considered somewhat simpler to use but less advanced. It had some weird bugs; at one time if you CALLed a procedure with constants in the CALL, the value of the constants could be overwritten. I DON'T remember the details (or even how to write a FORTRAN subroutine) but something like

  • SUBROUTINE ANY (I,J)
  • ...
  • I=17
  • RETURN
  • END
  • ...
  • CALL ANY(2,3)

After executing the call, any reference to the constant 2 anywhere in the program would be replaced by 17 (the value given to I by the subroutine).

The H compiler was the compiler for more complex projects, but I think was in some way more difficult to use, or maybe used more resources.

Not very useful, but maybe a bit better than nothing. Pol098 02:58, 30 April 2006 (UTC)

The letters stood for the minimum memory size originally needed to run the compiler. Fortran G required at least 128K bytes; Fortran H at least 256K. Back in the 1960s 256K bytes meant a big mainframe. The bug you describe was a pretty common in early Fortran systems and students were cautioned about it. --agr 18:54, 2 May 2006 (UTC)
"at one time if you CALLed a procedure with constants in the CALL, the value of the constants could be overwritten." I've experienced that one with a much more recent compiler—redefining the value of 0.0 caused me a great deal of pain debugging a program that was running under DVF around the turn of the millenium. (AFAIK, more recent versions of the Digital/Compaq/Intel compiler do the "right thing" and put constants in memory space marked as non-writeable.) --129.74.161.50 15:58, 12 September 2006 (UTC)
The bug described was certainly there in the H compiler. In one particular case, I remember using code similar to the above example, and followed it with an
  • K=1+1
Then whenever I would use K, it would actually be 17, as it had replaced 1+1 with the value of 2, which was now 17. As you can imagine, it took a long time for me to find and fix.Mjchonoles 22:38, 10 December 2006 (UTC)

Yes, you are absolutely correct regarding the behavior of the code, but that is NOT a "bug" in the compiler, per se. It is merely a consequence of argument-passing "by-reference" - which standard-conforming processors are allowed to do. (The program itself becomes non-standard-conforming when executed, which actually means that the processor can do whatever it wants!) Tripodics (talk) 16:58, 18 February 2008 (UTC)

[edit] Dates of standards appearing

A recent modification to the main article has added dates to the appearance of the various standard versions of Fortran. These are currently always set to the year implied in the version name. However, my recollection is that at least some of the completed standards did not appear until after the implied year e.g. Fortran 77 appeared in 1978. Can others with better memories shed more light on this please. Geoff97 20:55, 5 January 2006 (UTC)

The technical committee doing the actual work for a standard does not publish the standard; instead the committee's product goes to a secretariat. The secretariat, after addressing with the committee any questions/issues they may have, publishes the standard. Even without delay, publication in the same year is unlikely (especially back in those days, before word processors and the internet).


At its November 1976 meeting (which I hosted at BNL), X3J3 voted to use the informal name "FORTRAN 77" for the standard that was expected to be completed the next year. In fact, it was completed and received final approved in 1977, but the ANSI review process resulted in a publication year of 1978. Earlier, the revisions had been known as "FORTREV" since this was the first revision of the very first programming language ever to be standardized -- in the early 1960s, altho its publication did not occur until 1966.

The next revision was often referred to as "8X" since the process was originally expected to be completed in the mid-1980s (possibly as early as 1984). Later, the term "Fortran 88" was in vogue, but alas the aforementioned delays and objections (and in some cases "obstructions") exhausted the entire decade before the new standard finally emerged. Furthermore, the objectors succeeded in getting ANSI to block the actual revision of the standard designated as X3.9, retaining the obsolete version with that number, and instead creating an entirely new standard designation: "X3.198". The ANSI standard was designated as "X3.198-1992" because actual publication occurred in 1992.

Tripodics 23:31, 30 August 2007 (UTC)

[edit] Very poor article

ThSA. [65.54.97.190]

So then, improve it. Nahaj 01:57, 27 January 2006 (UTC)
I think it is a very good summary of what Fortran is, since I first used FORTRAN in 1971 and am an IT Professional I have some clue as to its accuracy and relevance. The article gives someone new to Fortran enough information to get a free complier and start using the language. KymFarnik 00:07, 15 April 2006 (UTC)

[edit] Advanced Sample Programs

The sample programs showing the array features are great, but those are not the only Fortran features. And though it is good to keep it as simple as possible, sometimes it is necessary to get things a bit more complex (and after all, the complex Fortran will remain easier than the easiest C++). That's why I added some code to depict pointers, protected arguments and the way modules would look in Fortran. It would be good if anyone could improve my comments on such code (because my explanations always tend to be very short). Also, I checked the Fortran 95 Standard and tried to comment all the possible non-standard features, but I might have skiped one or two non-standard statements (or maybe more). (02/27/2006)

[edit] Continuation card identifier

In a recent edit it was stated that anything but a blank or zero in column 6 identified a continuation. I don't remember a zero in column 6 being ignored in this way; is this correct? For now I will edit the article to exclude it; if correct, no doubt it will be reinstated. Pol098 03:02, 30 April 2006 (UTC)

The edit was correct. According to my copy of IBM's "Reference Manual 709/7090 FORTRAN Programming system" Form C28-6054-2, Rev. Jan. 1961, p.4: "Column 6 of the initial card of a statement must be blank or punched with a zero. Continuation cards (other than for comments), on the other hand, must have column 6 punched with some character other than zero, and may be punched with numbers from 1 through 9."--agr 03:48, 30 April 2006 (UTC)

[edit] No FORTRAN standards before F66

The article says that standards existed for pre-FORTRAN 66 variants. I don't believe this is correct. Before ASA X3.9-1966 (the FORTRAN 66 standard), the language was defined by its implementations and vendor reference manuals. I think F66 was the first "standardized" FORTRAN. If this is not correct, can someone point to the earlier ANSI / ASA / BEMA standards for the language? (Tue May 2 17:19:29 GMT 2006)

I think you are right and have edited the article accordingly. I also took out the claim that FORTRAN III was the first to have boolean expressions. IBM 709/7090 FORTRAN had a form of boolean expression that required a "B" to be punched in column 1. --agr 18:31, 2 May 2006 (UTC)

The first Fortran standard was ECMA's 1965 standard.

[edit] Dates

A recent edit states things like "Fortran 77 in 1977, Fortran 90 in 1990, etc". My recollection is that the release dates were mostly after the number on the product. Kerrigan's "Migrating to Fortran 90" states that the Fortran 77 ANSI standard was published in 1978. Metcalf et al's "Fortran 95/2003 explained" states that Fortran 90 was published in 1991, that Fortran 95 was finalised in 1995, but the ISO standard published in 1997, and that Fortran 2003 was finalised in late 2003, but the full revision was planned for 2004. Can this be checked? --Bduke 23:06, 2 May 2006 (UTC)

I took out the years except for 1966. It was sounding a bit pedantic anyway. If we find an authoritative source and it seems important to note the discrepancy, we can add them back. --agr 17:02, 3 May 2006 (UTC)

[edit] Where to buy FORTRAN ?

Is IBM still the owner of FORTRAN ?

Who is the distributor of FORTRAN ?

"FORTRAN" isn't an owned object...there are sometimes many fortran compilers available for any particular computer, some free and some commercial, some from the computer/OS vendor and some from third parties. DMacks 22:35, 11 May 2006 (UTC)
Answer: NO. I believe IBM explicitly granted the rights for others to implement "FORTRAN". Tripodics (talk) 06:44, 6 December 2007 (UTC)
Various vendors, inc IBM, have Fortran compilers for various machine architectures. Try the free ones ... G95 is good. KymFarnik 07:11, 23 June 2006 (UTC)
Sun Studio compilers (including Fortran) and tools are now free on Solaris and (soon) Linux. --rchrd 07:00, 10 July 2006 (UTC)

[edit] double precision complex

I think it is perhaps misleading to say that "Fortran 90 also introduced a double-precision complex-number data type" -- since, for the reason demonstrated in the article, most of us had been using double-precision complex-number types since we got F77. Perhaps the practical effect of the late standardisation was that the generic functions didn't handle double-precision complex-number types: you had to use the double-precision versions of the complex-number functions.

[edit] DOUBLE PRECISION (KIND=8)

In the first FORTRAN standard (X3.9-1966), the REAL data type was typically implemented with a 36 bit floating-point word (on the predominant 70x architectures), providing more than six decimal digits of precision, and DOUBLE PRECISION was rarely needed. With the advent of the IBM 360 architecture (with 32-bit words and hexadecimal normalization), floating point values suffered a slight loss of precision, and many scientific users converted their existing codes to automatically use DOUBLE PRECISION for all REAL variables.

FORTRAN 90 introduced a "KIND=" specifier which, when used with COMPLEX, allowed the user to declare a complex variable to contain two values of any precision supported by the processor. Many processors accepted multiple type declarations such as "DOUBLE PRECISION COMPLEX" (or compiler-switches such as "automatic double precision") as equivalent to COMPLEX with a default specification such as "KIND=8" .


[edit] COMPLEX operators in Fortran 8X

Some vendors questioned whether or not it was necessary to extend the new standard to include complex exponentiation (i.e. raising a complex number to a complex power). As a representative of Brookhaven National Laboratory, I inquired between X23J3 meetings about the need for this, and found one scientist at BNL (Dr. R. Sternheimer) who insisted that there was a legitimate need for such precise exponentiations in certain calculations); based on this input, the Fortran Standards Committee decided to include exponentiation (**) among the operators defined for the COMPLEX data types in Fortran 90. Tripodics (talk) 08:09, 6 December 2007 (UTC)


[edit] ASSIGNed GO TO

By the way, I'm surprised at the amount of space given to the "ASSIGN .. TO .." structure. I don't think I've ever seen that in code at all! We just used "=", and there was always a little bit of discussion at the beginning of computer programming courses where you would be told that the "=" sign did not mean that the two values were equal. (david)

ASSIGN...TO... is not an arithmetic assignment at all! (Have another look at the explanation.) As far as I know, all Fortran compilers would balk at
    integer lbl
    lbl = 40
    goto lbl
    ...
40  continue
because 40 is an integer expression, not related to the code at statement 40. Use of ASSIGN was questionable in the heyday of Fortran, and the shop I worked in would make endless fun of any code which actually used it. By the late 1970s Go To Statement Considered Harmful had taken firm hold. EncMstr 17:42, 8 July 2006 (UTC)


User:EncMstr speaks truth. One of the wierd things about ASSIGN and assigned GOTO is that the 'numeric' version of a symbolic name is in a namespace distinct from the 'assign' version of the same name.--Wws 04:44, 24 July 2006 (UTC)

Agreed. "ASSIGN 40 to J" is entirely different from "J=40" and the latter does not accomplish the former on most processors. (If there is no statement labeled "40" then the first statement is invalid; however, the X3.9 standards were not allowed to specify the behavior of a processor when encountering a syntactically-invalid statement!!!) Tripodics (talk) 08:09, 6 December 2007 (UTC)

[edit] Wikibooks

Hi, I'd just like to inform everyone that I will be taking text from this article in assisting with the development of the Fortran wikibook, as it is also GFDL-licensed, if there are no objections. Also, if anyone would like to assist me in helping develop the wikibook, it would be much appreciated.

--Arthurv 14:23, 9 July 2006 (UTC)

[edit] Fortran complex type compared to C99

The entry mentions that Fortran supported complex variables, but C doesn't. C99 introduced a complex type, so I'm confused by this statement. Was it meant to apply to C89, or is Fortran's complex type somehow different from C99's? —Preceding unsigned comment added by 203.23.238.108 (talk • contribs)

(ettiquette asks us to add new topics to the end of the talk page, so this is moved accordingly)
The C99 standard added the complex type to the language—before then it was from the standard library (which many consider preferable due to type promotion complication). As C99 isn't widely recognized in commercial compilers (with the notable exception of GCC), it's kinda hard to say "it's here." The type complex has been in the Fortran language at least since F77, probably earlier. —EncMstr 19:29, 16 July 2006 (UTC)
Ah, I see. One reason I brought this up is because C99 is mentioned two paragraphs later. The same argument (general lack of compiler support) can be applied there as well. Wouldn't it be more consistent to have both or neither? Or perhaps rename the "C/C++ is 'just as fast'" header to something more general about C & co and include discussion about this in there? I'm probably not alone in finding it of interest.

I think the discussion of "C/C++ is 'just as fast'" is very important, as it is a common myth. (As any compiler writer who has struggled with aliasing vs optimization issues will tell you.) Another myth is that "C99 isn't widely recognized in commercial compilers". C99 is available in many commercial compilers.--Wws 04:38, 24 July 2006 (UTC)

I know complex was in FORTRAN IV, as it is explained in the Elliott Irving Organick book "A FORTRAN IV Primer" that I learned FORTRAN from. -- RTC 16:26, 15 September 2006 (UTC)

[edit] "Although originally intended for internal use only on the IBM 704 computer"

I don't believe this "internal use", cannot recall having ever seen such a statement in any of the early Fortran articles or interviews. Why would United Aircraft have loaned Roy Nutt for an internal IBM project? Re the note for Miles Ellis as the source -- will contact him.

Miles replied "I can see that it might be possible to read that to imply that IBM never intended to release the product to customers, but that was certainly not what I meant"

[edit] Is Wiki International or U.S.A. specific ?

Fortran 90 is an international standard, but the referenced standard is American.

Fortran 1997 has a note re ANSI, but not for all the other countries that have adoped this standard.

Either reference the ISO standards where they exist & delete the 1997 ANSI note, or reference ANSI standards only.


Actually, in the case of Fortran-66 and Fortran-77, the ANSI standard came first, then ISO rubber-stamped it. However in the case of Fortran-90, ISO came first, then ANSI rubber-stamped it. --Wws 04:33, 24 July 2006 (UTC)

Actually, the ECMA 1995 Standard came first. Actually, the ISO recommendation re 66 includes ASA Fortran 66, ASA Basic Fortran 66, and ECMA 65. See Brainerd p.28 in Hill & Meek. Or see Day 1978 "Compatible Fortran".


The heyday of Fortran for me was early 1980s—I knew nothing of ISO until shortly after that. ANSI was all there was—and needed to be. Not exactly a love affair, but she served her purpose. Lacking ISO standards, wouldn't Japan, UK, Italy, etc. use whatever version of the compiler the vendor offered, whether or not it was ANSI? I don't remember many choices.... —EncMstr 08:23, 25 July 2006 (UTC)

Using the compilers the vendors offer is the only choice. But if a Japanese customer wants a standard-conforming product, they will either reference an ISO or a Japanese standard. ISO standards are often translated into Japanese, including Fortran, and that translation adopted as the Japanese national standard. Same for many other countries.


The ANSI X3J3 (Fortran) committee developed the -66 and -77 Standards. Vendors implemented them and ISO rubber stamped them. (Now that I think about it, I don't know if there was an ISO version of Fortran-66.) In the case of Fortran-90, the very short story is that the X3J3 got seriously deadlocked for several years. ISO finally got frustrated and dictated what *they* thought the Next Standard should look like, and X3J3 basically accepted it. Fortran-95 and -2003 were driven by X3J3 again, with ISO rubber-stamping.

There are no technical differences between the ANSI and ISO versions of the Standards - basically just the name on the cover page. IMHO, Wikipedia should simply state what is and was, and give recognition where recognition is due. --Wws 05:45, 26 July 2006 (UTC)

Fortran 90, 95, 2003 were all developed as ISO standards. The ISO Fortran committee, WG5, managed the work, made the decisions as to content, and delegated development to various national body standards committees. The development of the principal language standard for 90, 95, 2003 was delegated to X3J3 (now J3, I believe), the American Fortran committee (reflecting a concentration of vendors at that time, thus more bodies to do the work, and, not scattered across the globe, able to meet more frequently than an international committee). So "stating what is and was, and give recognition where ...due" is to list the ISO 90, 95, 2003 standards without mention of ANSI. That ANSI adopted (not rubber stamped!) those standards is no more significant than AFNOR, adopting a French translation, or any other countries standards organization adopting them.

[edit] Fortran 0

Found a Wiki article "Fortran 0", saying essentially that the 1954 Backus paper was "Fortran 0". If so, it should be identifed that way here -- I've never seen such a reference before. I set that page for deletion. The following comment was in the discussion page for "Fortran 0":

--Concerning Request for Verification--

The historical development of Fortran would suggest that there really was a FORTRAN 0, but it was not known as that at the time. AlyM 10:13, 30 January 2006 (UTC)

Donald Knuth gave a talk at the Computer History Museum in Mountain View, California, titled, if I recall correctly, "Twelve Predecessors to Fortran," a review of early programming language development. I believe all predated Fortran 0, though. —The preceding unsigned comment was added by 205.175.225.22 (talk) 22:59, 7 December 2006 (UTC).

[edit] FORTRAN II with Format

I vaguely recall around 1965 that this name was used for the compiler I used on an IBM 1620, implying it was FORTRAN II with format statements added. --Brat32 04:55, 9 August 2006 (UTC)

[edit] Standards binding to Fortran to be included

< ---------------------------------- I've hidden this. We don't list the GKS bindings, why list the POSIX binding?

-- I am unhiding it because it is an important (but unfortunately not universally implemented,) capability that some Fortran programmers use. The reference is useful. It (and other POSIX bindings for ADA, COBOL, and others) also represents an interesting historical point where non-C languages were allowed their own language-specific OS bindings in a POSIX environment. <------------------------------------->

The above comments re POSIX binding were moved from the article to this discussion.


[edit] SAS - a Fortran extension (preprocessor) or just an application?

Was initally written in Fortran, then rewritten in PL/I, then C. Seems like an application, not an extension(Preprocessor) SAS is definately an application. It is not an extension or preprocessor. --Wws 13:29, 16 August 2006 (UTC)

So it didn't belong in "Fortran Variants" -- I'll delete it.

[edit] fortran 2003 is not object oriented!!!!

As far as I understood the basic definition of an object oriented language includes stuff like classes and inheritance. Fortran 2003 can emulate this, by using function pointers, but it is not part of the language. Therefore it is wrong to write that fortran is object oriented.—The preceding unsigned comment was added by 203.200.55.101 (talkcontribs) 07:57, 18 August 2006.

Even the article you link to says Fortran2003 is OO. Rangek 16:37, 18 August 2006 (UTC)

I replaced the brief 2003 text with Reid's summary.

Although it is correct to say "Fortran 2003 doesn't spell object-oriented programming concepts the same way that C++ does," it is incorrect to say "Fortran 2003 is not object oriented." The object-oriented programming model is consciously based upon Simula, not C++. Fortran 2003 has extensible types, inheritance, polymorphic variables, and type-bound procedures (in addition to procedure pointers); what else is needed to qualify it as "object oriented?" Van.snyder 20:03 22 August 2006 (UTC)

[edit] cleaning up the article

I took out all of the tutorials, books, etc. listed in the history section and put them in the external links section to make the page more readable. In addition I think it might be a good idea to add a separate page for the history of fortran for the details and make what's on the page more succinct. 130.215.112.54 22:41, 25 August 2006 (UTC) John S.


Sorry about that. I'll try to delete as many of my edits as I can, reverting as best as possible to the succinct, encyclopedic, July 18th version. btw, for anyone that wanted the fluff I addded (and am now deleting), you can always go to this history item

         22:04, 25 August 2006 130.215.112.54 (Talk) (removed unused "References" section)

and click "last". That should display the intact file, before John S.'s edit. Further, you can then click "edit", select all text, and save it to your own file. Can that file then be opened as a Wiki? I don't know, but you can always paste it into a sandbox to view as a Wiki. Apologies again for getting so far off-track.


re: Ryulong (Talk | contribs) m (JS: ..... Please do not compromise the integrity of pages.)

Well, a newby still learning: I had deleted the article text those discussions were in reference to, so it seemed (to me) reasonable to delete the discussions as well. What value is a discussion history of non-existant text? More apologies & thanks. btw "Any good-faith effort to improve the encyclopedia, even if misguided or ill-considered, is not vandalism."

[edit] Fortran Commands (for 66, 77, 90, 95, 2003...)

I wonder if you agree with me that Fortran commands should be written here. It could be useful to be able to compare it with another language's possibilities. (Or maybe they are already somewhere on Wikipedia???) Max

[edit] Blanks insignificant --before-- Fortran 90???

The section on "arcane syntax" states that blanks were not significant before Fortran 90. Surely that is the wrong way around? --Slashme 14:28, 8 September 2006 (UTC)

Yes, blanks were not significant before Fortran-90 (and, it still aren't in fixed-form). That means that the following was a valid program (all blanks are stripped before parsing):
     PROGRAMMING
     REALITY
     COMP LEX SPECIALIS
       I TY=2
     DOING=1,INT(I T Y)
         WR ITE(*,*) ING
     E N D D O
     END

output:

  1
  2

Duja 15:20, 8 September 2006 (UTC)

I think there is a little confusion on this matter. Early Fortran (like Cobol) was designed with storage on punched cards in mind, so certain fields on the card had significance:
  • column 1 was the comment field: a C here caused the entire card to be ignored by the compiler
  • columns 2 to 5 were the label field: a sequence of digits here was taken as a label for the purpose of a GOTO or a FORMAT reference in a WRITE or READ statement;
  • column 6 was a continuation field: a non-blank character here caused the card to be taken as a continuation of the statement on the previous card.
  • columns 73 to 80 were ignored; punched card machines sometimes placed a card sequence number here to guard loss of data by removal of cards or scrambling of order of cards in the deck.
  • this left columns 7 to 72 as the statement field.
Within the statement field, blanks were insignificant, with the exception of so-called Hollerith designators, which normally appeared in FORMAT statements and were normally used to represent quoted text. Blanks and leading zeroes, I think, were also insignificant in the label field. --Tony Sidaway 14:00, 19 January 2007 (UTC)

Minor corrections/notes re the above:

In FORTRAN 77, column 1 could also contain an asterisk ("*") to indicate a comment.
X3J3 added the "*" as a result of Public Comment #1 on the dpANS for the revison of X3.9-1966
Columns 1 thru 5 were the label field (as long as column 1 did not contain a "C" or "*").
Any statement could have a "label" (or statement number) on its initial line.
The DO loop also required a number on its last statement (until Fortran 90).
In column 6, a zero ("0") would also indicate a new statement (as did a blank).
However, column 6 was ignored if column 1 made the statement a comment.
Columns 73-80 typically contained a "deck" identifiers and sequence numbers (often 4 columns each).
These were often punched automatically, using a wired board in the card "Reproducer" machine.

Incidentally, the reason for 72 columns was that IBM 70x computers read cards in "row binary", which meant that the 80 bits of each row were read into three consecutive 36-bit words per row. Backus discarded the last eight columns, skipping every third word for the sake of increased efficiency (which was his principal goal in developing the original FORTRAN).

One of the first tasks of the compiler was to gather together the twelve Hollerith bits from one column (stored at the same bit position in in twelve different words!) to produce each 6-bit BCD character, packed six per word. The use of columns 1-6 for non-statement information (comment, label, continuation) was also motivated by the 36-bit (6-character) word length, since these fields were all contained in a single word, with each line of a statement (from columns 7-72) contained in eleven 36-bit words. With a maximum of nine continuations beyond the initial line, 60 characters (in 110 words) was the maximum statement length -- before discarding blanks. FORTRAN 77 increased the number of continuation lines to nineteen, doubling the maximum statement length to 1320 (in the "Full Language"; the "Subset" remained at 660).

Tripodics 12:44, 30 August 2007 (UTC)

The IBM 704, 709, 7090, etc. computers did read "row binary", but only read 72 columns of a card, NOT 80. These 72 columns were read into consecutive pairs of words, NOT into 3 words. The card reader dropped the 8 columns, which could be selected by a plugboard on the reader, NOT by software on the computer. However this only applied to the online card reader. If offline card equipment was used to transfer the deck to magnetic tape, all 80 columns could be read by the computer from the tape images. -- RTC (talk) 23:14, 21 November 2007 (UTC)

Minor additions to the above discussion regarding blanks:

While FORTRAN 66 generally ignored blanks within columns 7-72 (except within Hollerith fields, etc.), and concatenated initial and continuation lines into one long statement, there was at least one restriction on continuation: the initial line of a continued statement (after discarding blanks) could not be "END".
FORTRAN 77 added a further restriction that columns 1 thru 5 must be blank in a continuation line (i.e. where column 6 does not contain blank or zero and column 1 does not contain "C" or "*"). While this made life a bit easier for implementors (and grammarians), it actually invalidated some standard-conforming programs.

Tripodics (talk) 17:32, 18 February 2008 (UTC)

[edit] Too much emphasis on history

The section on the history of FORTRAN should be moved to the end of the article or to a separate page. A random reader will probably want to know about the features that fortran has now before he delves into the differences between FORTRAN 66 and FORTRAN 77.

Beg to differ. FORTRAN is an historical artifact and should not be revived or learned by newbies. —Preceding unsigned comment added by 202.82.33.202 (talk) 11:11, 7 September 2007 (UTC)

[edit] First complete F77 compiler

In regards the edit yesterday and subsequent reversion... the claim is also made on the f2c page, which has citations to uphold it. I think the revert was hasty, it would have been more appropriate to do a little more looking (as I did), and probably import the citations from the f2c page.

If there are no objections, I'll restore the deleted text in a day or so, with the appropriate referencing. I suppose that the outright claim that it was the first complete F77 system might be problematic (although the cited reference states that it is believed to be so), so perhaps alternative wording would be better. --Mr Wednesday 18:45, 2 November 2006 (UTC)

Hi Mr. W. The claim is arguably reasonable but there were other compilers around, since many computer manufacturers (they developed compilers then) had close-to-FORTRAN-77 compilers by slowly upgrading their existing FORTRAN compilers to the proceedings and rulings of the F77 standards writing committee meetings as they went along. This also caused misfirings. Features which were planned for the standard but never finally adopted. But left sometimes in these compilers. There likely were other cases. Re-wording is best, making the claim softer. Bests. --- (Bob) Wikiklrsc 22:16, 2 November 2006 (UTC) (User talk:Wikiklrsc)

I was the one who reverted. Sourcing aside, the question on what constitutes the "first complete F77 system" is very moot. Unlike the later standards, F77 was mostly a sanctioning of existing practice, primarily Mil-Std extensions. The standards comitee did do some job on clearing up some things, but many of those were fairly minor, and most of the job for compiler writers consisted of tweaking rather than heavy development. Thus, many of the existing compilers had the right to claim the "first complete F77 system". Duja 08:36, 3 November 2006 (UTC)

Hi Duja. Those are good points you bring up. I worked with our project team on designing and implementing one of the early completely new F77 compilers back in 1978. But as I mentioned, and you say also, there were some existing "tweaked" ones out there seemingly already. Our mission was to do it from scratch with a new HLL kit. Best Regards. --- (Bob) Wikiklrsc 17:13, 3 November 2006 (UTC) (talk)

[edit] Textbooks

The textbook section as of 13 Dec 2006 is as follows.

  • Chapman, Stephen J. (2003). Fortran 90/95 for Scientists and Engineers, 2nd ed., McGraw-Hill. ISBN 0-07-282575-8.
  • Ellis, T. M. R., Ivor R. Phillips, Thomas M. Lahey (1994). Fortran 90 Programming, 1st ed., Addison Wesley. ISBN 0-201-54446-6.
  • McCracken, Daniel D. (1961). A Guide to Fortran Programming. Wiley.
  • McCracken, Daniel D. (1965). A Guide to Fortran IV Programming. Wiley.
  • Metcalf, Michael, John Reid, Malcolm Cohen (2004). Fortran 95/2003 Explained. Oxford University Press.
  • Nyhoff, Larry, Sanford Leestma (1995). FORTRAN 77 for Engineers and Scientists with an Introduction to Fortran 90, 4th ed., Prentice Hall. ISBN 0-13-363003-X.

This is an odd mixture of ancient FORTRAN, Fortran 90, and Fortran 2003 textbooks. I think the 1960s textbooks should be removed, since they would not be useful for someone learning Fortran today.

I also did a double-take when, reading the article a few minutes ago, I saw my old Fortran textbook from University (McCracken's Fortran IV) listed there. However these are references to the development of the language, and that's the subject of this article. The article isn't really intended solely to teach programmers how to program in Fortran. I think McCracken's books are excellent examples of textbooks on Fortran during its most popular period, before it was eclipsed by Pascal and C. The Fortran IV book was still in use well into the 1970s. --Tony Sidaway 08:51, 1 February 2007 (UTC)

[edit] Criticisms and rebuttals

I have removed the section named "Criticisms and rebuttals." In its present form it amounts to the exchange of advocacy and counter-advocacy, without any attribution of the opinions expressed.

If there is or was a public debate concerning the usability of Fortran, it should be possible to describe that debate, with references to significant expressions of opinion by the principal actors in that debate --Tony Sidaway 13:44, 19 January 2007 (UTC)

I feel deleting the entire section was not appropropriate. Some of the information was factual. How does one atrribute all opinions in a large article? statsone 03:44, 21 January 2007 (UTC)
I've no strong objection to its restoration, though I think it's unsuitable in its current form because it turns this article into an advocacy piece. One way in which Wikipedia's Neutral Point of View policy is formulated is: "assert facts, including facts about opinions — but do not assert opinions themselves." In its current form, the piece I removed expresses some opinions as facts. It is the case that we must always attribute opinions in Wikipedia. There are no exceptions. If you can't find a significant record of an opinion being expressed, then the opinion cannot be significant enough for the article. --Tony Sidaway 14:16, 22 January 2007 (UTC)

[edit] Split History of fortran into a separate article

I think that the section history of fortran should be put in a separate article or at least moved to the end of the fortran article. We should focus on writing a fortran-article that is helpful for a person that has just started learning about the language. This person will be interested in a short summary of the language features and a few descriptive programs. —The preceding unsigned comment was added by 90.184.26.120 (talk) 15:53, 22 March 2007 (UTC).

[edit] Fortran 90

I'm surprised there is no discussion of the FORTRADA '90 controversy.

If memory serves me every major FORTRAN vendor save one voted NO on the Fortran 90 standard. They were out voted by the fact that IBM gets one vote and every government lab that send a representative gets one vote.

The vendors hoped that F90 would standardize enhancements, suchs as records, and include statements. Instead, it turned out to be effectively a new language.

In many ways, F90 was the nail in FORTRAN's coffin. —The preceding unsigned comment was added by 12.44.243.251 (talk) 21:34, 8 May 2007 (UTC).

I think you're in a small minority as far as your opinion of the efficacy of the F90 standard. It's highly unlikely that I would be using Fortran today if the F90 features (or similar analogs) had not been added to the language. I also think you mischaracterize the controversy over the 1990 standard, wherein (according to a report I've seen [1]) a few holdouts managed to stack ANSI's X3J3 (and subsequently X3 itself) but were overridden by ISO's WG5. --Mr Wednesday 20:25, 30 August 2007 (UTC)

No, this is not correct. Many vendors voted yes on the Fortran 90 standard, as did nearly all of the "user" representatives on X3J3. (My recollection is that a majority of vendors were in favor, but I may be mistaken about that. I'll try to check this in my old minutes.) On the other hand, for various reasons, many vendors did stall the process (which was originally targeted for the mid-1980s).
Tripodics 23:11, 30 August 2007 (UTC)
Bruce A. Martin,
(X3J3 member from 1976 thru about 1995)

[edit] Object deck vs. absolute deck

When the IBM 1401 and 1440 produced (punched) the object deck, I recall an option to produce an "absolute" deck. I believe it was less cards than the object deck, and it ran the program faster. A short paragraph in the main aritcle would be good to explain some on these two decks. I do not have any refs to adequately write this. Can someone help. Thank you. LanceBarber 17:51, 30 August 2007 (UTC)

[edit] Coding conventions

Are there any widely used coding conventions? For example, Java has these.

dfrankow (talk) 20:40, 24 January 2008 (UTC)

I don't think any were formally established until long after Fortran was in widespread use. I wouldn't be surprised if that created interest in establishing coding standards or conventions. However, most fortran code I've worked on tends to look like one or the other of of two forms: structured and spaghetti. —EncMstr 21:00, 24 January 2008 (UTC)

[edit] FORTRAN V

It may be worth including mention of FORTRAN V which, as you all know, was a name adopted by some/several compiler providers for their own extended version of FORTRAN IV. Melcombe (talk) 16:40, 18 February 2008 (UTC)


I disagree that "FORTRAN V" should be singled out for mention.

Because IBM's successor to FORTRAN II was named FORTRAN IV (there was no release of III), and because that release served as the basis for the standardization effort (for what became "FORTRAN 66"), various other vendors tried to gain a marketing edge by adding some nonstandard calling their products something like "FORTRAN V" or "FORTRAN VI" (Control Data) or "FORTRAN 76" (GE). I don't think these variants are particularly significant (except that some of them introduced extensions that eventually made it into 77 or 90), but I'd have no objection to a list that includes a good sampling of them (but not merely "FORTRAN V"). Tripodics (talk) 17:41, 18 February 2008 (UTC)

[edit] Published validation report on ISO/IEC 1539 ???

Although Fortran 2008 is on the way, I still need to know if there is any validation to have been done on the any part of Fortran 2003 - ISO/IEC 1539. If there is no report published in literature, then the series of the standard are not valid, hence should not be implemented —Preceding unsigned comment added by 64.62.138.94 (talk) 05:32, 24 February 2008 (UTC)

[edit] IBM-1130 FORTRAN-IV vs. FORTRAN-EMU?

About 1978 I used an IBM-1130 computer to write several FORTRAN programs. I remember that IBM's FORTRAN compiler lacks some features of FORTRAN-IV specification, but that Eastern Michigan University had improved IBM product in a compiler called FORTRAN-EMU. For this reason I never used IBM FORTRAN, just FORTRAN-EMU. I think that the missed features was LOGICAL values: relational operators and logical IF, but I am not sure. Anybody knows anything about this matter? Aacini (talk) 03:45, 9 May 2008 (UTC)