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.

17 of 273 comments (clear)

  1. Re:What is Fortran used for these days? by bsdparasite · · Score: 2, Informative
    It is still being used in structural analysis tools. These old fortran programs run and run well. Libraries of stuff have been built long ago and they just work. Sure, C is great, but for running simulations which are 2 days long on a Cray, Fortran can't be beat.

  2. 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
  3. 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

  4. Could be a step backwards by CaptainAlbert · · Score: 2, Informative

    So, someone's finally noticed that using a souped-up version of BASIC for writing mission-critical numerical code is a bad idea. :)

    However, it's likely that most programmers who needed features such as inheritence, polymorphism, function pointers and so on have already bitten the bullet and moved to a C++ environment; trading off some gripes about the "standard implicit type conversions" (spit) for the increase in modularity, interoperability, etc. Introducing such features into the Fortran language now isn't going to re-write thirty years of pre-F2000 code. It feels like we're going to end up with "VB for scientists"at this rate!
    But the real reason that so many people still stubbornly use Fortran is *performance*. Because the language is so much simpler (i.e. less expressive) than C or Java, it's hell of a lot easier to perform optimisations on it. Good Fortran compilers can re-arrange loop nests and do all sorts of clever stuff to improve parallelism, locality, and other aspects of performance. Add expressiveness (in the form of pointers, for example) and you add many extra complications which can render the optimisations invalid. If you can't optimise it as aggressively as you used to, you've just lost the penultimate excuse that anyone is still writing in Fortran. (The last excuse is that the 500,000 line codebase they're working on is also written in Fortran :-)).

    Now I'm sure that lots of professional users and compiler writers have been involved in drafting the new standard, and that these concerns have been addressed. But I still reckon that Fortran needs euthanasia, not resurrection!

    There, my 2p is now your 2p :)

    --
    These sigs are more interesting tha
  5. 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.
  6. 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! )

  7. Re:And surprisingly in other news... by hugesmile · · Score: 2, Informative
    You young whippersnappers don't appreciate the past. Computers and languages were here long before you were, and trust me, Slashdot wouldn't even exist, if it weren't for the pioneers working in Fortran and Cobol, and Grace Hopper running around with her 12 inch wire telling us what a nanosecond is.


    Those who don't learn from the past are condemed to repeat it. So learn to appreciate it, or your next job is going to be coding in Fortran 2000.


    10 if (you .ne. learnfrompast) then 10

  8. Re:If only fortran were useful by WetCat · · Score: 2, Informative

    Because Fortran 90, for example, is one of
    the most parallelizable languages right now
    that support automatic parallelization to
    many CPUs.
    Because a lot of numeric libraries are available for that language.
    Because it's a lot easier to write numeric calculation programs on Fortran.

  9. 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

  10. erm... Fortran allows what? Vectorization. by Anonymous Coward · · Score: 1, Informative

    It is still used for numerical computation because its default pointer aliasing rules allow

    erm... you forgot to say what they allow. Fortran's default pointer aliasing rules prohibit two arrays passed to one subroutine from aliasing to one another. This allows for code optimization using a processor's vector units.

  11. 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.

  12. FORTRAN IS GREAT FOR MULTIPROCESSING by goombah99 · · Score: 2, Informative

    Fortran has some notable advantages over C. Perhaps the most latent advantage is in the realm of multi-processing. For example there are several statments that give the compiler big hints that the loop can be spread out. For example there is loop command that is like a FOR loop but specifically says the order of the loop evaluation does not matter. Other looping commands tell the computer to apply a function over an entire array at all positions specified in a map. Function declarations tell the compiler if a variable/array in the arg list will be altered by the function call. There are delberate limits on pointer type variables that forbid pointer arithmatic and allow compiler efficiencies. As a result fortran is a marvelous multi-processing language because the compiler knows how to allocate instructions safely and how to allocate memory optimally.

    --
    Some drink at the fountain of knowledge. Others just gargle.
  13. 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
  14. You are more correct than you think, maybe by Anonymous Coward · · Score: 1, Informative

    What you are saying could not be more true.

    The thing is, Fortran is fighting a language war on two fronts.

    On the one hand, it's struggling against newer languages like C/C++--and yes, sometimes even Java--that younger programmers are more familiar with and that have been more flexible for some years. Often, there's at least some question as to whether or not code written in one of those languages is similar enough in speed to that written in Fortran, and often, the answer, after some debate, is that it's 95% the speed or something like that, and the ease of coding far outweighs the speed lost.

    On the other hand, Fortran is struggling against very-high level languages like MATLAB/Octave, S/R, Ox, and to a certain extent, Perl, Python, and Ruby. These languages aren't exactly competitors in speed, but their ease of use is unparalleled. Everyday computational tasks that used to be done in Fortran (or C) are now routinely done in MATLAB or R because it's just so damn easy to do.

    Modern Fortran is beautiful as a numerical programming language. It is oriented toward numerical analysis far more than C/C++, so much so that it's almost comparable to something like MATLAB.

    The sad thing is, though, that not many people seem to be switching to it. True, there are those that use it, but it's often for reasons of tradition or because speed, pure and simple, is an absolute priority. It's a small group. It doesn't seem to be attracting those who currently use MATLAB, but who might use something more low-level because MATLAB isn't flexible enough, or those who use C/C++/Java/Ocaml/whatever because that other language is flexible/easy to code/portable/whatever but might switch because those languages are a bitch relatively speaking when it comes to numerical analysis.

    I'd argue that the reason why more people aren't switching is precisely because it's not more available. When someone is trying to decide between C/C++, MATLAB, or Fortran, Fortran is going to lose:

    C/C++ is often similar in speed to Fortran, has compilers freely available, and is generally more extensible than Fortran.

    MATLAB is slower, and costs lots, but there are open-source alternatives, and it's damn easy to write code for.

    Modern Fortran is fastest, but often only slightly faster than C/C++; it's easier to code numerical routines than C++, but not necessarily always due to libraries, and less easy to code in than MATLAB; finally, it's unavailable unless I pay money on the order of MATLAB.

    So you can see, most people buy MATLAB, and code really low-level stuff in C/C++/whatever.

    If Fortran is going to survive, it needs to do more than have modern features--it needs to be competitive on an avaiability front as well. Otherwise it's going to die off a slow death.

  15. 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

  16. Re:What is Fortran used for these days? by vi-rocks · · Score: 2, Informative
    No. You're a liar. A dirty, rotten liar.

    Man! I hate being called a liar -- OK, you asked for it! -- Here is the code. The executable was wrapped in a shell scrip that shuffled everything nicely along -- it also required standard input file (text) to define the address for the envelope

    A link to "EV" Fortran source code