FORTRAN is a computer programming language used mainly in Mathématiques and in the applications of scientific computation.

History

John Backus, pioneer of data processing, publishes in 1954 an article titrated Preliminary Report, Specifications for the IBM Mathematical FORmula TRANslating System, FORTRAN. It took then two years of effort for the team which it directs within IBM to write the first Compilateur FORTRAN (25 000 lines, for the IBM 704).

Today still (2007) language FORTRAN remains very much used, on the one hand because of the presence of very many libraries of functions usable in FORTRAN, on the other hand because there exist powerful Compilateur S FORTRAN which produce achievable the very fast ones. However, it is sometimes détrôné, even for scientific applications, by the languages C and C++.

FORTRAN having been created at the time of the perforated cards (in particular with the system FMS), it kept a certain rigidity in the page layout of the source, until FORTRAN 90. The code had a long time for example to start starting from the 7th column and not to exceed the 72e (columns 73 to 80 being reserved for the classification of the perforated cards).

Moreover, many industrial codes were written for a long time in FORTRAN, and the compatibility of the new versions with the preceding ones is essential, at the price of the conservation of obsolete concepts.

The language BASIC, in its original version (1964) was conceived like a small language in teaching matter making it possible to initiate the students with the programming, before passing to the languages " sérieux" time: FORTRAN and ALGOL. One thus finds there some features of language FORTRAN.

There exist free extensions, based on GCC to compile FORTRAN 77 and now 90 and 95, inter alia under Linux. Intel provides also a compiler free owner for FORTRAN 90, for the Architecture x86 but only under Linux. It is however possible to obtain a version of evaluation for Mac OS X and Windows.

Examples

PROGRAM DEGRAD ! ! Print a conversion chart degrees - > radians ! ================================================= ! ! Declaration of the variables INTEGER DEG REAL RAD, COEFF ! ! Heading of program WRITE (*, 10) 10 FORMAT ('', 20 (“*”)/& & “* Degrees * Radians *”/& & '', 20 (“*”)) ! ! Body of program COEFF = (2.0 * 3.1416)/360.0 C DEG = 0,90 RAD = DEG * COEFF WRITE (*, 20) DEG, RAD 20 FORMAT (“*”, I4, “*”, F7.5, “*”) END C ! ! End of the table WRITE (*, 30) 30 FORMAT ('', 20 (“*”)) ! ! End of program STOP END PROGRAM DEGRAD

Notes:

  • This program is written in FORTRAN 90.
  • the symbol! as first character indicates a comment.
  • the declaration of the variables is optional in FORTRAN, but the variable DEG would be then of type REAL (the variables whose name starts with IJKMLN are owing to lack of type INTEGER, the others of type REAL).
  • the WRITE instruction refers to a unit of input-output (here *: the terminal) and a specification of format. Example the format of label 20 indicates that it is necessary to write a space, a star and two spaces, then floating on 4 characters including one after the decimal point, etc a declaration of FORMAT can be anywhere; a practice is to put it right after WRITE to which it refers, another is to put them all at the end of the unit of program.
  • the character & at the end of a line indicates one following the following line and, the character & at the beginning of the line indicates the continuation of the preceding line.
  • the instruction " C DEG = 0,90" indicate to repeat the instructions which follow (to line 100 included/understood) for values of variable DEG between 0 and 90 (by step of 1).
  • instruction END C marks the end of C.

Various versions of FORTRAN

  • 1956 . FORTRAN II had only one branch instruction (" Yew-arithmétique") at 3 addresses: IF (A-B) 10,20,30 indicated to jump to the instructions from label 10,20 or 30 according to whether A-B were negative, null or positive.

  • 1958 . FORTRAN III is never " sorti" in the form of product.
  • 1962 . FORTRAN IV introduced, inter alia, the instruction " Yew-logique" , making it possible to write IF (.GE has. B) GOTO 10 (to go to 10 if has are equal to or higher than B).
  • FORTRAN V was the name under consideration at the beginning for PL/I, computer programming language universal of IBM which was to join together the best aspects of FORTRAN (for the scientific applications), of COBOL (for the business applications), with some loans with Algol.
  • 1966 . FORTRAN 66 is the first officially standardized version (by the American Standards Association) of FORTRAN. One often confuses it with FORTRAN IV.
  • 1977 . FORTRAN 77, inter alia improvements, facilitates the programming structured with blocks " IF (...) THEN/ELSE/ENDIF". In 78, an extension introduces C WHILE/END C.
  • 1990 . FORTRAN 90: modules, recursivity, Overload of the operators, new standard of data, etc It is an important update to bring FORTRAN to the level of the other modern languages. Restrictions concerning working of the programs (columns 1 to 7,72 to 80…) disappear: the writing is done finally in free format.
  • 1995 . FORTRAN 95
  • 2003 . FORTRAN 2003: like his/her old colleague COBOL, FORTRAN supports the directed Programmation now object

References

Bonds internal

External bonds

  • the forum of mutual aid of users FORTRAN French-speaking people
  • Preliminary Carryforward, Specifications for the IBM Mathematical Formulated TRANslating System, FORTRAN, November 10th, 1954.
  • Comparison (benchmark) of various compilers FORTRAN, in English

Graphic libraries

Standards FORTRAN do not include graphic instructions. To mitigate this lack, it is necessary to use libraries:
  • pilib (Platform Independent Library for FORTRAN): interface Fortran/GTK. Under development. Free software.
  • Quickwin: graphic library provided with Compaq Visual FORTRAN (from now on Intel Visual FORTRAN). Function only under Windows.
  • Winteracter: graphical interface and tools for visualization. Commercial software for Windows, Linux and MacOS X.
  • SansGUI: commercial interface for Windows and Compaq Visual FORTRAN.
  • DISLIN: graphic library created by the max Planck Institute for Solar System Research. Multi-punt-forms (UNIX, Linux, FreeBSD, OpenVMS, Windows and MS-DOS). Function with many compilers. Free for a not-commercial use.
  • JAPI (Java Programming Application Interfaces): interface Java/FORTRAN allowing to create a complete graphical interface for FORTRAN programs. Multi-punt-forms (Windows, Linux, Solaris). Function with many compilers (inter alia gfortran, Compaq Visual FORTRAN…) Free software under license LGPL.

  • Ftcl: interface FORTRAN-Tcl/TK. Free, open-source.
  • f90gl: interface FORTRAN 90 with OpenGL, LIME and GLUT. Multi-punt-forms. Function with many compilers. License: public domain.
  • GrWin Graphics Library : free software for Windows.
  • Xeffort: graphic library for Visual FORTRAN. free software for Windows.
  • g2 graphical library : for Linux, AIX, DIGITAL Unix, SunOS, IRIX, VMS, Windows. Free software under license LGPL.
  • PLplot: library to plot scientific curves. Multi-punt-forms (Linux, Unix, MS-DOS, Windows, Mac OS X). Free software under license LGPL.
  • PGPLOT: library of graphic routines, interactive, free, multi-platform, manages many peripherals of exit.

Random links:Anne Alvaro | Liberation popular front of Palestine | University of Valencians | Adaptive Modulation and Coding | Jacques Legrand (footballer)

© 2007-2008 speedlook.com; article text available under the terms of GFDL, from fr.wikipedia.org