Slashdot Mirror


Fortran 2000 Committee Draft

Richard Maine writes "John Reid, convenor of the ISO Fortran standards comittee, has posted the following announcement to some Fortran-related forums: 'I am pleased to tell you that the draft Fortran 2000 standard is now out for comment. ... The J3 (USA Fortran committee) version, which is identical except for the title page and the headers and footers, is available in ps, pdf, text, or source (latex). This is a very significant milestone for Fortran 2000. It is a major extension of Fortran 95 that has required a significant amount of development work by the J3. ... The abstract of the revision, which lists the major enhancements is appended. I have written an informal description of the new features, which will be published in the next issue of Fortran Forum (about to appear).'"

The formal position is that a CD (Committee Draft) Registration and Approval Ballot is in progress. The deadline for comments (from national bodies) is 27 December. Each national body will have its own deadline ahead of 27 December, so be sure to submit your personal comments to your national body well before then. For the USA, they should be sent to Deborah Donovan, email: ddonovan@itic.org. For the UK, they should be sent to David Muxworthy, email: d.muxworthy@ed.ac.uk.

John Reid, ISO/IEC JTC1/SC22/WG5 Convener

.................................................. ......................

ISO/IEC JTC1/SC22/WG5 N1494

Committee Draft revision of ISO/IEC 1539-1:1997 - Programming Language Fortran - Part 1: Base language

Abstract

Fortran is a computer language for scientific and technical programming that is tailored for efficient run-time execution on a wide variety of processors. It was first standardized in 1966 and the standard has since been revised three times (1978, 1991, 1997). The revision of 1991 was major and those of 1978 and 1997 were relatively minor. This proposed fourth revision is major and has been made following a meeting of ISO/IEC JTC1/SC22/WG5 in 1997 that considered all the requirements of users, as expressed through their national bodies.

The significant enhancements in the 1991 revision were dynamic storage, structures, derived types, pointers, type parameterization, modules, and array language. The main thrust of the 1997 revision was in connection with alignment with HPF (High Performance Fortran).

The major enhancements for this revision are

(1) Derived type enhancements: parameterized derived types, improved control of accessibility, improved structure constructors, and finalizers.

(2) Object oriented programming support: type extension and inheritance, polymorphism, dynamic type allocation, and type-bound procedures.

(3) Data manipulation enhancements: allocatable components, deferred type parameters, VOLATILE attribute, explicit type specification in array constructors, pointer enhancements, extended initialization expressions, and enhanced intrinsic procedures.

(4) Input/output enhancements: asynchronous transfer, stream access, user specified transfer operations for derived types, user specified control of rounding during format conversions, named constants for preconnected units, the flush statement, regularization of keywords, and access to error messages.

(5) Procedure pointers.

(6) Support for IEC 60559 (IEEE 754) exceptions.

(7) Interoperability with the C programming language.

(8) Support for international usage: access to ISO 10646 4-byte characters and choice of decimal or comma in numeric formatted input/output.

(9) Enhanced integration with the host operating system: access to command line arguments, environment variables, and processor error messages.

In addition, there are numerous minor enhancements.

Except in extremely minor ways, this revision is upwards compatible with the current standard, that is, a program that conforms to the present standard will conform to the revised standard.

The enhancements are in response to demands from users and will keep Fortran appropriate for the needs of present-day programmers without losing the vast investment in existing programs.

25 of 273 comments (clear)

  1. latex..hmmm... by selderrr · · Score: 3, Funny

    available in ps, pdf, text, or source (latex).

    Now who says Fortran is not a sexy language ?? hum ?

  2. What is Fortran used for these days? by beanerspace · · Score: 4, Interesting
    As a programmer who cut his teeth on good-old K&R C back in the 80's and has been fortunate/unfortunate enough to avoid shooting himself in the foot with Fortran and/or Cobol ... I have 2 questions?
    1. What are the compelling reasons to use Fortran in 2002?
    2. Do they differ much from the use of Fortran in the past?
    3. Is it the same language as the Fortran of prior decades?
    4. Can someone summarize without the tech-eze the future of Fortran - especially in light of the aforementioned Fortran 2000 Committee Draft?

    Just curious I guess.
    1. Re:What is Fortran used for these days? by sisukapalli1 · · Score: 3, Informative

      There is one compelling reason for using Fortran still: the set of available libraries. By libraries, I do not mean generic libraries to connect to databases, or to parse XML, or such, but libraries that say, simulate the chemistry of gases in the atmosphere, and so on.

      The main pain with such libraries is the amount of effort that goes on into debugging and evaluating the code. In case of many Fortran libraries for numerical analysis, a lot of that work is already done. While, porting it to C/C++ or Java appears trivial (in most cases it is also not trivial), doing the QA involves unacceptable costs.

      There is also a thing or two to be said about the speeds, which many folks have noted.

      S

    2. Re:What is Fortran used for these days? by /ASCII · · Score: 5, Informative
      Fortran is NOT the same language as in prior decades. Some differences:
      • Fortran77 and earlier where made for punchcard machines. Incorrect indentation caued lines to be treated as comments, variable declarations or something other than what was intended.
      • For the same reason, anything past character 73 was a comment in Fortran77.
      • Fortran allows dynamic memory allocation nowdays.
      • Global variables don't use the hideous common block

      The list goes on and on, but these are changes that where implemented in Fortran90. Since then, attepts have been made to turn Fortran into an OO language. Aid i18n and other things to make Fortran less of a CS language.

      The reason you might want to try out Fortran is because of speed. Under gcc/Linux C may be the fastest language, but under Solaris, Irix, AIX and other oldschool OSes, Fortran is still speed king, for two reasons.

      Firstly, the Fortran compilers are well tuned mature products under these platforms.

      Secondly, the Fortran language makes all kinds of assumptions that the programmer must adhere to. Example: If a function recives two arrays, they must not overlap. This allows Fortran compilers to do loop unrolling in cases where a C-compiler cannot.

      --
      Try out fish, the friendly interactive shell.
    3. Re:What is Fortran used for these days? by vi-rocks · · Score: 4, Informative
      What are the compelling reasons to use Fortran in 2002?

      Fortran is still used quite a bit in scientific and engineering circles. There is a HUGE code base that people (understandably) do not want to give up. I spent three years in the mid-90's developing groundwater numerical models with Fortran90.

      Some reasearch instutituions and software development companies have starting using C; however, mainly for pre- and post-processors. Many are still using Fortran numerical engines.

      Another reason that Fortran was still popular (at least through the 90's) was that some of the major compilers (Such as IBMs Fortran complier) ROCKED. Some simulations that I was working on took weeks to peform and the compliers were very good at optimizing the Fortran code -- without the scientist getting too close to the hardware.

      I must admit; however, that today all my programming is either done in C, Objective-C, or Perl -- even though gcc will compile Fortran code. (Can you believe I wrote a postscript driver for printing evelopes on our lab's printer in Fortran! )

    4. Re:What is Fortran used for these days? by Draoi · · Score: 3, Interesting
      A lot of the human genome mapping stuff was written in Fortran. I knew one of the guys who was working on it (in Cambridge - UK, not MA!)

      Loadsa stuff on Fortran and genome mapping here This site has thousands of contemporary applications of Fortran. Just follow the link back up ...

      --
      Alison

      "It is a miracle that curiosity survives formal education." - Albert Einstein

    5. Re:What is Fortran used for these days? by slide-rule · · Score: 3, Interesting

      Let me somewhat answer w/ what I know from the basis of Fortran '90; I haven't seen anything specific on 2000. Where I work (large aerospace industry company) all the Fortran code is still the old-school stuff (F'77... or older); there's so much of it, and it uses so many anachronisms and non-ANSI (machine and/or compiler dependent tricks / hacks / bugs / unknown evil things) code constructs that the majority of it just *cannot* even be ported to '90. (I know... I tried porting a rather small thing over to only compile with the new compiler, and all the output was way, way wrong, owing to an unknown issue that I didn't have the skill and the boss didn't have the money to chase.)

      Now, F'90 didn't have true OO in it; it had just introduced "MODULE"s, and for those couple of us rebellious "young'uns" that embraced it, '90 was far and away better. I'm personally a big fan of more complete OO programming, but the bosses and supervisors here just cannot comprehend what it even is. (I've tried to explain it several times... their perspective, and perhaps refusal to learn from someone half their age, prevents their understanding at why OO is, generally, a Good Thing). Are the current Fortran languages similar? Well, in the sense that C++ is (or can be) similar to C, then yes... assuming you only code to the bits that you understand. But doing so really defeats the whole purpose of having revised the language.

      For my $0.02, with where Fortran seems to be trying to head (not that I've read the referenced draft; I haven't), we might as well write and compile with C++; the vaunted speed advantage starts bleeding away with (direct or indirect) access to pointers and other things, and my experience here the past several years is that said speed difference is mainly a function of the quality of the compiler anyway. (And ours sucks big hairy ones, and I won't say which one it is.)

      The biggest insurmountable hurdle here is that Fortran now-a-days is really only *used* in the scientific community, and, by and large, such community is less concerned with staying up with the new learning curve of programming practices and more concerned with getting the next thing done. (For a humorous semi-related example of this, consider our recent "port" of a well-used CFD code into Fortran '90... we changed the make file to use "f90" rather than "f77" and made sure it still compiled... huzzah! we now have a Fortran '90 program *cough*NOT*cough*...)

    6. Re:What is Fortran used for these days? by DaveAtFraud · · Score: 3, Informative
      Fortran is NOT the same language as in prior decades. Some differences:
      • Fortran77 and earlier where made for punchcard machines. Incorrect indentation caued lines to be treated as comments, variable declarations or something other than what was intended.
      • For the same reason, anything past character 73 was a comment in Fortran77.
      • Fortran allows dynamic memory allocation nowdays.
      • Global variables don't use the hideous common block
      Gee, I used FORTRAN 77 on VAXes through most of the early to mid 80s and we:
      • Didn't use punch cards: VT100s baby
      • Only comments and statement numbers had fixed columns: you're thinking of FORTRAN IV.
      • Clarification: 1 through 72 code, 73 through 80 were comments.
      • Dynamic memory allocation existed as a DEC extension to VAX FORTRAN. Lots of other hardware manufacturers provided the same capability, it just wasn't standard.
      • ...and explain to me the difference between a global variable and a variable in a common block.
      Also, last I checked (admitedly a while ago), FORTRAN under Linux gcc was translated to C for compilation.
      --
      They that can give up essential liberty to obtain a little temporary safety deserve neither safety nor liberty.
      Ben
  3. Need a GNU version by alexhmit01 · · Score: 4, Insightful

    I had to learn F77 for a class my freshman year (1997, not THAT long ago) and we were working with F77. A part of that appeared to be because there were free compilers. Since most Fortran code is done in research groups that aren't computer groups, they may not all think to buy a real compiler.

    A Free F2000 compiler - that researchers here about - would go a long way towards getting Fortran coders into Fortran 2000.

    My understanding is that F95 and now F00 (or whatever) are "modern" langugages.

    Amazing what you can do WITH backwards compatibility if you put energy into it.

    Alex

  4. Re:Do we care? by Pedrito · · Score: 5, Funny

    Isn't Fortran completely irrelevant in the 21st century anyways?

    Absolutely not!!! NASA uses it to slam probes into Mars.

  5. Background on Fortran by tibbetts · · Score: 5, Informative

    For those of us under 50, here's some history of the granddaddy of all high-level programming languages.

    IIRC, my former graduate advisor and professor was on the team that wrote a very early Fortran compilers at MIT in the late 50s, written entirely on punch cards. We've come a long way in ~50 years.

    --
    :wq
  6. Re:Do we care? by T.E.D. · · Score: 3, Interesting
    Isn't Fortran completely irrelevant in the 21st century anyways?
    Absolutely not!!! NASA uses it to slam probes into Mars.

    I hope this gets modded up as funny (because it is). However, I feel compelled to point out two things:
    1. Fortran is indeed in wide use still. I know the Flight Simulator business is chock full of it. I'd suspect anything that involves a lot of number crunching and has been done for more than 5 years has a lot of it done in Fortran.
    2. The mars probe actually had an unusual amount of non-Fortran code in it. It had a great deal of AI software in it, which makes a bit of sense when you consider that you can't exactly have someone sitting in Houston trying to control it with a joystick in realtime. The ping time to Mars is just brutal. :-)

    So Fortran may have taken us to the Moon, but it takes an expert system to slam probes into Mars.

  7. This raises an interesting question..... by dannyp · · Score: 3, Interesting

    How many /.-ers have ever written anything in Fortran? Sounds like a poll topic to me.....

  8. Neither Fortran, Latin, nor Greek is dead by yerricde · · Score: 3, Informative

    You compare Fortran 2000 to supposedly "dead" spoken languages with Microsoft version numbers after them.

    Fortran is not dead. It is still used for numerical computation because its default pointer aliasing rules allow. C only picked up similar aliasing rules in C99, which no common compiler fully supports yet.

    Latin is not dead. It simply became Italian, with forks turning into Romanian, Spanish, and French, and then Portuguese, Sardinian, and several other languages forking in turn from those.

    Greek is not dead. What the heck do you think they speak in Greece?

    --
    Will I retire or break 10K?
    1. Re:Neither Fortran, Latin, nor Greek is dead by fsmunoz · · Score: 3, Informative

      Latin is not dead. It simply became Italian, with forks turning into Romanian, Spanish, and French, and then Portuguese, Sardinian, and several other languages forking in turn from those.

      Actually that's not quite right; all the neo-latin languages are directly descendant from Latin (minus perhaps local variations that are that: variations). Romanian, Spanish French, Portuguese, Sardinian, etc, were all derivations from latin (i.e. all first descendants). TO add more fuel to the fire 'Spanish' is actually a gross generalization; it should be properly called Castillian, since it was the language of the Kingdom of Castille and appeared at the same time as Portuguese, Leonese and Catalan (Occitan).

      cheers,

      fsmunoz

  9. Re:And surprisingly in other news... by PythonOrRuby · · Score: 4, Informative

    I think in general it helps to teach more than one language. The current trend is to have a "core language" that schools teach in excruciating detail so that students will be able to go out and get a job right away, because they have a "skill".

    But much of the time, they don't understand how or why what they've been taught actually works, which makes learning other programming languages vastly more difficult, since they're focusing on what's different in the syntax rather than on what's the same in the semantics.

  10. Thump Thump Thump... What's that noise? by tommck · · Score: 4, Funny
    That's the sound of a club hitting a bloated sack of rotting protoplasm that used to be a dead horse back in 1985
    </sarcasm>

    T

    --
    ---- It puts the lotion on its skin or else it gets the hose again. It does this whenever it's told.
  11. Re:As they say... by DaveAtFraud · · Score: 4, Interesting

    The original quote appeared in an issue of Scientific American that came out in the late 1990s. The article was on, you guessed it, the amazing longevity of FORTRAN. The bottom line is that there are a fantastic number of huge FORTRAN libraries out in the real world for doing all sorts of number crunching. The libraries are well understood, any bad behavior at boundary conditions is documented and they have a lot of milage on them so the results are generally regarded as valid. It makes far more sense to keep something called FORTRAN around that is compatible with this code than is does to attempt to re-write and re-test.

    Oh, and no one cares that there isn't a pretty GUI interface to programs for analyzing structural stress, heat flow analysis, doing x-ray crystalography, etc.

    --
    They that can give up essential liberty to obtain a little temporary safety deserve neither safety nor liberty.
    Ben
  12. They're ruining FORTRAN!!! by vrmlguy · · Score: 3, Interesting
    I went to college in the mid 70's. We learned (essentially) Fortran 77, although it wasn't called that then. F77 didn't have a very formal standardization process, it was just the collecting of extensions that several vendors (mostly IBM) had made to F66.

    F77 was a cool language. IIRC, the original version of Adventure Cave used an interpreter that was written in F77. It is also one of the few languages that have native support for imaginary numbers (some versions of APL did as well).

    Looking at the summary of changes, I suspect that they've finally messed up the things that made FORTRAN (or at least F77) great. The addition of pointers stands an excellent chance of rendering code un-optimizable, and I fear that adding OO features is an even bigger mistake. I would have liked to have seen Unicode support and exception handling, and that's about it.

    --
    Nothing for 6-digit uids?
    1. Re:They're ruining FORTRAN!!! by Eric+Smith · · Score: 3, Insightful
      IIRC, the original version of Adventure Cave used an interpreter that was written in F77.
      Some ports might have used F77, but ADVENT was originally written on a DECsystem-10 using Fortran-10, which was DEC's implementation of FORTRAN 66. The original code is available in the Interactive Fiction Archive; there are two versions ever so slightly different, adv350-pdp10.tar.gz and advent-original.tar.gz. I'm not certain which was earlier, though one of them has some messages in mixed case, so that is probably later. All others can be traced back to one of these.

      String handling in FORTRAN 66 was not very portable. On the DECsystem-10, five ASCII characters were stored per word. This was the biggest hassle in porting to another platform.

  13. Re:Do we care? by sbaker · · Score: 3, Interesting

    I work in the flight sim business. I can assure you that every one of the 2 million plus lines of code written by my team over the last ten years was in C++ and for the ten years before that it was in C or Ada.

    30 year old code will probably be in FORTRAN.

    We do still have legacy code in Fortran. Mostly stuff we inherited from other simulators - and mostly in the area of simulating the actual flight dynamics. That stuff is hard to rewrite accurately and is a *tiny* fraction of a typical multi-million-lines-of-code simulator.

    HOWEVER (dragging this screaming and kicking back on-topic) there is absolutely no need to invent FORTRAN 2000 just so we can run legacy code. If it's legacy code, that's because we can't/won't rewrite it - so why would we need a new revision of the language?

    All that the world needs is a good way to call FORTRAN functions from within C++ - and we already have that.

    FORTRAN should just be left to die peacefully.

    --
    www.sjbaker.org
  14. Re:damn fortran by foobar104 · · Score: 5, Insightful

    although for the size of our projects C++ is the obvious lnaguage of choice

    Um... no. The language that your people are comfortable using is the language of choice. No other meaningful criteria exists.

    Let's say there were some magic language, Foo, that was absolutely perfect for computational chemistry. It has standard library calls like solveThisHardProblemQuickly() and such. Just perfect.

    Like any other programming language, Foo has a strict syntax. It's easy to write a buggy program in Foo, but tricky to write a perfect one. All languages are like this.

    Your Fortran programmers decide they're going to abandon their preference and write in Foo instead. How many months do you think it would take for them to become conversant in Foo? How many trivial bugs will slip through in that time because your programmers weren't experienced enough with Foo to catch them? How far behind will you be at the end of the whole process?

    And that's assuming that Foo is perfect. If Foo has its own idiosyncrasies and quirks, you can comfortable double those estimates.

    There is only one inviolable law of computer programming: do what works.

  15. Re:Fortan Rocks!! by aallan · · Score: 4, Insightful

    Back in my grad school days (5 yrs ago) everyone who had supercomputer time was writing in FORTRAN.

    Amoungst physicists and astronomers, anyone with supercomputer time today is still writing in FORTRAN. I don't see that changing in the near future. Graduate students are starting to write in different languages, but to talk to their superivsors (the guys with large existing codebases) they have to be able to talk and write FORTRAN.

    Most of the time its not worth their time to port a couple of hundred thousand lines of modelling code to some other language before they can add layers on top, its unlikely it'll ever be worth anyones time to do somethnig like that.

    A lot of the Java, Perl/Tk and Python/Tkinter stuff I write these days is sitting ontop of a whole bunch of FORTRAN that it would take the next twenty years to rewrite. If it works, whats the point of doing it all again? Thats no fun...

    I think language interoperability is becoming more and more important now the industry is (sort of) maturing. This is where code reuse in the real world is going to come from, rather than the current fads in code design which keep on promising more code reuse.

    Al.
    --
    The Daily ACK - Eclectic posts by yet another hacker
  16. regular expressions by brer_rabbit · · Score: 3, Funny

    One of the biggest additions to Fortran that I haven't seen mentioned so far is support for Perl 6 style regular expressions.

    [ducks for cover]

  17. What a lot of CS people forget... by jellisky · · Score: 5, Informative

    ... is what FORTRAN is good for: number crunching. F77 is a perfect tool for many scientists who don't care about pointers or object oriented programming or nice graphical output subroutines or any other nice things that other programming languages have. They want something that will do some number crunching for them and won't screw up or cause problems.

    FORTRAN is simple. It works like many mathematicians and scientists think it should. It meshes well with what they really want to do in a good number of cases. The level of abstraction is perfect for many of them.

    FORTRAN will take a long time to die because of this. Personally, I like more real-time interpretive languages like IDL. But when it comes down to something that is pure number crunching that'll take a few hours, I'll gladly have FORTRAN. That's why so much in the sciences is written in FORTRAN, then the data is output and run through other programs to do the pretty plotting and further interpretation.

    FORTRAN just works, has worked for 30+ years, and with the amount of incredibly useful code still around, will still work for decades to come. Granted, I don't necessarily like some of the proposed changes, but as long as everything works like it did before with F77 code, I think no one will (or should) mind.

    -Jellisky