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.

13 of 273 comments (clear)

  1. 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 /ASCII · · Score: 2, Interesting

      Fortran90 and C play nice nowadays when it comes to cross language library usage. At least in my experience, which is limited to the standard compilers under IBM SP2, IRIX and Solaris.

      --
      Try out fish, the friendly interactive shell.
    2. 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

    3. 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*...)

  2. Re:Need a GNU version by Shimbo · · Score: 2, Interesting
    A Free F2000 compiler - that researchers here about - would go a long way towards getting Fortran coders into Fortran 2000.

    Yeah, trouble is a modern Fortran compiler is both hard to write and about as unsexy as it gets in the GNU/Linux world. Which is sad because the language is dismissed by folks who should know better, based on syntax that was obsolete even in F77.


    Now we can return to the: I haven't used Fortran for 25 years, has anything changed posts? And why doesn't someone write an OO language based on C?

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

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

    1. Re:This raises an interesting question..... by Anonymous Coward · · Score: 1, Interesting

      Unfortunately, the language is still considered an essential prerequisite to an engineering degree at many universities. At ours, the choice is offered to take a Fortran course or a C++ course. Having learned C++ in high school, I opted to try something new. I'm currently in our college's introductory Fortran course. The language is the most antiquated, atavistic, anachronistic heap I've ever encountered. Any problem Fortran can solve is also solvable by C. The only excuse to still be using Fortran is to mantain old code and, on certain platforms, write lightining-quick optimized code. As the platform on which our school teaches Fortran is WinXP, I doubt that the latter is one of their concerns. Furthermore, they present Fortran as the optimal solution for modern engineering problems, so I doubt they're prompted merely by nostalgia.

      Fortran should be deprecated. We should not be teaching the next generation of professionals to be programming in Fortran. We should be doing our best to move them onto a new platform. Offer some Fortran experience later on, strictly so that they aren't totally oblivious, but make sure that you emphasize the obsoleteness of the language.

  5. Not Dead, living peacefully in the background by ilyahndre · · Score: 2, Interesting

    Fortran isn't entirely dead. At least to the scientific community. I am a Fortran programmer, working at in a research position and I'm not 50 years old, I'm not even 20. (Yeah for co-op)

    Truthfully, anything that Fortran can do, C can do better. But that wasn't always the case. Fortran used to be A1 for number crunching, and thus is used and still used by many research companies. Sometimes, if you don't have a CS degree its just easier to use the language you learned when you were in University or College than spend the time learning C or Java.

    Some older satellites (8-15yrs) used Fortran code. And if those satellites are still in the sky, (which they are) then those persons working on keeping and updating them need to use good 'ol Fortran to keep them up in the sky.

    Each 'new' version of Fortran tries to get a little bit more object-oriented than the last. At the moment I use both 77 and 90 (neither are object oriented). Fortran also has the lovely feature of GO TO!

    Fortran will probably be used for awhile longer. Even with .Net. Try it some time, its a rather amusing little language.

  6. 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
  7. Re:Goodie! by MadHungarian · · Score: 2, Interesting

    There are a lot of factories out running FORTRAN, usually on DEC/COMPAQ/HP OpenVMS systems to do plant floor control. I just ported an OpenVMS system to Windows 2000, about 1/3 of the code is FORTRAN. (Why not Linux you ask, because Linux does not have "events" like OpenVMS and Windows 2000 have. Given the extra time it would have taken to change the structure of the code, it was cheaper to buy Windows. Actually my customer would have prefered Linux.)

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