Talk:Fortran: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Line 200: Line 200:
== "Although originally intended for internal use only on the IBM 704 computer" ==
== "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? Unless there is a known source, it should be deleted. [[User:Rwwww|Rwwww]] 08:37, 20 July 2006 (UTC)
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 -- I know Miles & will contact him. [[User:Rwwww|Rwwww]] 06:49, 26 July 2006 (UTC)


Re the note for Miles Ellis as the source -- I know Miles & will contact him. [[User:Rwwww|Rwwww]] 06:49, 26 July 2006 (UTC)
Miles has not responded, I'll try other contacts.[[User:Rwwww|Rwwww]] 17:20, 9 August 2006 (UTC)


== Is Wiki International or U.S.A. specific ? ==
== Is Wiki International or U.S.A. specific ? ==

Revision as of 17:20, 9 August 2006

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
I found http://www.faqs.org/faqs/fortran-faq/ and it seems to support the Fortran spelling.

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

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

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)


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)

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]

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.

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)

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.

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.

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)

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)[reply]

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)[reply]

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)[reply]
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)[reply]

Agreed. Wikipedia should be equally accessable to non-programmers too. I suggest that it be removed. michaelb 15:56, 8 February 2006 (UTC)[reply]
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)[reply]

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)[reply]

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)[reply]

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)[reply]

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). Rwwww 07:49, 22 July 2006 (UTC)[reply]

Very poor article

ThSA. [65.54.97.190]

So then, improve it. Nahaj 01:57, 27 January 2006 (UTC)[reply]
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)[reply]

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)

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)[reply]

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)[reply]

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)[reply]

The first Fortran standard was ECMA's 1965 standard. I added it to the article. Rwwww 22:45, 26 July 2006 (UTC)[reply]

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)[reply]

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)[reply]

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)[reply]
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)[reply]
Sun Studio compilers (including Fortran) and tools are now free on Solaris and (soon) Linux. --rchrd 07:00, 10 July 2006 (UTC)[reply]

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.

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)[reply]


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)[reply]

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)[reply]

Why not ask authors of recent Fortran books if their text could be donated to Wiki. A Fortran 90 or 95 text with no new editions planned would likely have few current sales and if donated would give you a major start. Ask Ellis, for example (but don't tell him I suggested it). Rwwww 08:49, 20 July 2006 (UTC)[reply]

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 (talkcontribs)

(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)[reply]
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)[reply]

"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 -- I know Miles & will contact him. Rwwww 06:49, 26 July 2006 (UTC)[reply]

Miles has not responded, I'll try other contacts.Rwwww 17:20, 9 August 2006 (UTC)[reply]

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. Rwwww 00:24, 23 July 2006 (UTC)[reply]


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)[reply]

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". Rwwww 02:10, 27 July 2006 (UTC)[reply]


I'll try more specific questions. The 1997 ISO standard entry includes text re ANSI. Should that entry also note the UK, Japan, France, Germany, ....? If "No", why should ANSI be noted?

And, unrelated, how do I say "Thanks" to whoever is cleaning up my edits? Rwwww 08:00, 25 July 2006 (UTC)[reply]


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)[reply]

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. Rwwww 07:33, 26 July 2006 (UTC)[reply]


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)[reply]

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. Rwwww 07:33, 26 July 2006 (UTC)[reply]

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)[reply]

Rwwww 01:52, 9 August 2006 (UTC)[reply]

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)[reply]