• Fortran programming language. The Walking Dead. Fortran

    History of the creation of the Fortran programming language. Existing standards. Version of the Fortran programming language.

    Programmers wrote programs for the first computers in machine command languages. This is a very labor-intensive and lengthy process. A significant amount of time passed between the start of compiling the program and the start of its use. This problem could only be solved by creating automated programming tools.
    The first “tools” that saved programmers’ labor were subroutines. In August 1944, the first subroutine for calculating sinx was written for the Mark I relay machine under the leadership of Grace Hopper (a female programmer and naval officer in the US Navy).
    Grace Hopper was not the only one who was concerned about the problem of making the work of programmers easier. In 1949, John Mauchly (one of the creators of the ENIAC computer) developed the SHORT Code system, which can be considered the predecessor of programming languages high level. The programmer wrote down the problem to be solved in the form mathematical formulas, converted formulas into two-letter codes. In the future special program translated these codes into binary machine code. Thus, J. Mauchly developed one of the first primitive interpreters. And in 1951, G. Hopper created the first compiler A-0. She was the first to introduce this term.

    First high-level languages: Cobol and Fortran
    In the 50s of the last century, a group led by G. Hopper began developing a new language and compiler B-0. New language would allow programming in a language close to regular English. The language developers selected about 30 English words, for the recognition of which G. Hopper came up with a method that was preserved in the operators of future programming languages: each word contains a unique combination of the first and third letters. This allows the compiler to ignore all other letters in a word when generating machine code for a program.
    G. Hopper associated the need for the emergence of such a system, the language of which is close to spoken language, with the fact that the scope of computer applications will expand, and therefore the number of users will also grow. According to G. Hopper, attempts should be abandoned to “turn them all into mathematicians".
    In 1958, the B-0 system was called FLOW-MATIC and was focused on processing commercial data. In 1959, the machine-independent COBOL (Common Business Oriented Language) language was developed programming language high level for the corresponding translator from this language. Consultant during creation COBOL language G. Hopper spoke again.
    In 1954, a message about the creation of FORTRAN language(FORmula TRANslation) (Fortran). The birthplace of the language was the headquarters of IBM in New York. One of the main developers is

    John Backus. He also became the author of NFB (Backus Normal Form), which is used to describe the syntax of many programming languages. During the same period, the ALGOL language became popular in European countries and the USSR. Like FORTRAN, it was oriented towards mathematical problems. It implemented the advanced programming technology of that time, structured programming.

    Fortran in the USSR.

    Fortran appeared in the USSR later than in the West, since at first Algol was considered a more promising language in our country. Communication between Soviet physicists and their colleagues at CERN played a major role in the introduction of Fortran, where in the 1960s almost all calculations were carried out using Fortran programs.

    The first Soviet Fortran compiler was created in 1967 for the Minsk-2 machine, but it did not gain much popularity. The widespread introduction of Fortran began after the creation in 1968 of the FORTRAN-DUBNA compiler for the BESM-6 machine. EC computers, which appeared in 1972, already initially had a Fortran translator (“borrowed” from IBM/360 along with other software).

    Standards

    The language was standardized within ANSI and ISO

    Standards were developed - Fortran 66, Fortran 77, Fortran 90, Fortran 95, Fortran 2003 and Fortran 2008.

    Standardization of programming languages ​​creates preconditions for increased mobility software for computers of any architecture. The standardization of Fortran is one of the reasons for the longevity of the language, since it is thanks to standardization that the possibility of using a huge fund of application programs that have been created over the decades of the language’s existence has been ensured.

    Fortran is a highly standardized language, which is why it is easily portable to various platforms. There are several international language standards:

    FORTRAN IV(later used as the basis FORTRAN 66 (1966);

    FORTRAN 77(1978) many improvements: string data type and functions for processing it, block statements IF, ELSE IF, ELSE, END IF, INCLUDE statement, etc.

    Fortran 90(1991) significantly revised the language standard. A free format for writing code has been introduced. Appeared additional descriptions IMPLICIT NONE, TYPE, ALLOCATABLE, POINTER, TARGET, NAMELIST; control structures DO ... END DO, DO WHILE,CYCLE, SELECT CASE, WHERE; working with dynamic memory (ALLOCATE, DEALLOCATE, NULLIFY); software components MODULE, PRIVATE, PUBLIC, CONTAINS, INTERFACE, USE, INTENT. New built-in functions have appeared, first of all, OOP elements have appeared in the language for working with arrays

    Fortran 95(1997) - correction of the previous standard Fortran 2003(2004) Further development of OOP support in the language. Interaction with operating system The FORALL operator and construction have been introduced, allowing more flexibility than the WHERE operator and construction to assign arrays and replace cumbersome loops. FORALL allows you to replace any section assignment or WHERE clause, in particular, it provides access to the diagonal of a matrix. This operator is considered promising in parallel computing, facilitating parallelization more efficient than loops.

    Fortran 2003 (2004) Further development OOP support in the language. Interaction with the operating system. The following features have also been added: 1. Asynchronous data input/output 2. Means of interaction with the language. 3. Improvement of dynamic data placement. Fortran 2008(2010) The standard assumes support by means of the language parallel computing(Co-Arrays Fortran). It is also planned to increase the maximum dimension of arrays to 15, add built-in special mathematical functions, etc.

    Fortran programming language version

    Programmers who developed programs exclusively in assembly language expressed serious doubts about the possibility of a high-performance high-level language, so the main criterion when developing Fortran compilers was the efficiency of the executable code. A huge number of libraries have been created for this language, ranging from statistical complexes to satellite control packages, so Fortran continues to be actively used. There is a standard version of Fortran, WF (High Performance Fortran), for parallel supercomputers with multiple processors.

    Cobol (Cobol). It is a compiled language for use in economics and business problems, developed in the early 60s. It is characterized by great "verbosity" - its statements sometimes look like ordinary English phrases. Cobol provided very powerful tools for working with large amounts of data stored on various external media. A lot of applications have been created in this language, which are still actively used today.

    Algol (Algol). A compiled language created in 1960. It was intended to replace Fortran, but due to its more complex structure it was not widely used. In 1968, a version of Algol 68 was created, which in its capabilities is still ahead of many programming languages ​​today, but due to the lack of sufficiently efficient computers, it was not possible to create good compilers for it in a timely manner.

    Pascal. The Pascal language, created in the late 70s by the founder of many modern programming ideas, Niklaus Wirth, is in many ways reminiscent of Algol, but it has tightened a number of requirements for the program structure and has capabilities that allow it to be successfully used when creating large projects.

    Basic. There are both compilers and interpreters for this language, and in terms of popularity it ranks first in the world. It was created in the 60s as educational language and very easy to learn. This is one of the promising programming languages.

    C (Si). This language was created at Bell Labs and was not initially considered for mass production. It was planned to replace the assembler language in order to be able to create equally efficient and compact programs, and at the same time not depend on a specific type of processor. In the 70s, many application and system programs and a number of well-known operating systems (Unix) were written in this language.

    Java (Java, Java). This language was created by Sun in the early 90s based on C++. It is designed to simplify the development of C++-based applications by eliminating all low-level features from it. But main feature This language is compiled not into machine code, but into platform-independent bytecode (each command occupies one byte). This bytecode can be executed using an interpreter - Java virtual machine(Java Virtual Machine), versions of which are created today for any platform. Thanks to the availability of many Java machines, Java programs can be portable not only at the source text level, but also at the binary bytecode level, so the Java language today ranks second in popularity in the world after BASIC.

    IN lately programming systems focused on creating Windows applications:

    · plastic bag Borland Delphi (Delphi) is a brilliant successor to the Borland Pascal family of compilers, providing high-quality and very convenient visual development tools. Its exceptionally fast compiler allows you to solve virtually any application programming problem efficiently and quickly.

    · plastic bag Microsoft Visual Basic - a convenient and popular tool for creating Windows programs using visual tools. Contains tools for creating diagrams And presentations.

    · plastic bag Borland C++ - one of the most common tools for developing DOS and Windows applications.

    I first heard about Fortran in early childhood from my father. He said that in the 70s he had to stand in line for hours at almost the only computer in the university in order to run a primitive code using a punched card. I admit honestly, from then until recently (despite the technical education I received) I was in full confidence that Fortran remained somewhere far out there, in a world where information carriers are strange cardboard boxes with holes, and computers are so expensive, that are perceived as a real attraction.

    Imagine my surprise when I learned that Fortran is not only still used somewhere, it is being developed, in demand and is still relevant. If you also believed until this moment that Fortran had long been dead, then here are some interesting facts about why he is still walking.

    Survived at least 10 updates

    In fact, the Fortran you hear about from teachers at school or university was created between 1954 and 1957. It went down in history as the first fully implemented high-level language, made a small breakthrough in the IT world, but in essence it was not very convenient or functional. IBM began to “finish” it almost immediately; already in 1958, FORTRAN II appeared and, in parallel, FORTRAN III. But it acquired a more or less decent appearance only in the 70s, when fairly portable machines appeared, when a full-fledged IBM FORTRAN IV standard was developed, and FORTRAN 66 appeared with loops, labels, conditional statements, input/output commands and others by modern standards primitive capabilities.

    The latest version appeared in 2010, its name is Fortran 2008 (as you can see, in the course of history, the name stopped being written exclusively in capital letters), the distinctive feature of which is all kinds of parallel calculations, which have a positive effect both on the speed of data processing and on the size of the processed arrays. In addition, the release of Fortran 2015 is planned for 2018. From the announcement it follows that it will improve integration with C and also eliminate current shortcomings.

    Among the 30 most popular programming languages

    To date, 0.743% of requests in search engines Regarding programming languages, it is dedicated specifically to Fortran. To give you an idea of ​​how cool this is, just imagine that languages ​​like Lisp, Scala, Clojure, LabVIEW, Haskell, Rust, and VHDL are ranked lower.

    Can work on Android (and more)

    Over its long history, compilers for Fortana have been developed by companies such as IBM, Microsoft, Compaq, HP, Oracle, thanks to which today the language is compatible with Windows, Mac OS and Linux. Moreover, a convenient compiler application can now be taken with you thanks to the CCTools application for Android. You can run the compiler on your iPhone, but in this case you need to do a little magic.

    Competes with MATLAB

    So far, this text has not said the main thing, namely the scope of Fortran. So this is a language in demand in science and engineering, used in whole or in part for weather forecasting, oceanography, molecular dynamics, and seismological analysis. In general, this is a real “Data Science” language from the time when calculators first went on mass sale.

    It is worth recognizing that Fortran owes part of its popularity to its heritage. Over the years, with virtually no competition, the language has acquired a huge base of clients, libraries and add-ons. In addition, each next version Fortran inevitably supports the previous ones. Therefore, a situation has arisen where there are no significant factors for scientists and engineers to abandon this alliance.

    In fact, Fortran's main competitor today is MATLAB, which is more universal, more functional and convenient. However, MATLAB has strict limitations on the software used, is quite expensive and in most cases is simply unnecessary.

    Has a relatively bright future

    Of course, we cannot predict what will happen in 10-20 years, and how the IT world will change during this time. However, if you look at possible new competitors for Fortran (such as Go), their main disadvantage is their generalization. That is, the creators of Fortran very quickly outlined target audience in the form of scientists, their opinions and wishes have priority. Therefore, it is difficult to imagine that tomorrow they will abandon their “special order” for the sake of some fashion trend. It is on this basis that we can say that another generation of Fortran is leaving boldly.

    And then they'll just release a new version.

    * "PC Magic" 2000 No. 6(28), pp. 49–50.

    In 1955, the first high-level algorithmic language was released. FORTRAN(FORmula TRANslator - formula translator). It was used mainly to solve scientific, technical and engineering problems, and was developed by IBM employees under the direction of John Backus. A little later, in 1957, John Backus and his employees installed the first Fortran compiler at IBM (Bestinghouse). Programmers who previously worked exclusively in Assembly were skeptical about the capabilities of a high-level, high-performance language, so the main criterion when developing Fortran standards and creating compilers from this language was the efficiency of the executable code. By the way, the term “compiler” was not yet widely used, although it had already been introduced by Grace Hopper, the only female admiral in the United States, who was also called “the first lady of programming and the grandmother of Cobol.”
    Most Fortran statements translated directly into one or two machine instructions, simple syntactic constructs, and active use labels and goto made it possible to obtain very fast code, and as a result, Fortran programs sometimes ran faster than assembly ones. The internal structure of the translated program itself was also very simple - all code, all subroutines and all data, together with a common block, were located exclusively in static memory, because of which, however, it was impossible to use recursion.
    Since Fortran was the first high-level language that met the needs of most users of the time, and was also easy to learn, it spread very quickly.
    Due to the widespread use of this language and the emergence of many Fortran programs (mainly of a computational nature), the issue of its standardization has become urgent. At first it was standard Fortran IV 1964, then, as new ideas emerged, a new standard was adopted in 1978 Fortran 77(f77) with a large number of more modern and flexible syntactic extensions. Today the most common variant of Fortran is Fortran 90(f90) and Fortran 95. A group of enthusiasts is finishing work on a super version of the F2k language, which will be published this year.
    Although new versions of the language were sometimes introduced as unnecessary additions(for example, extensions related to dynamic memory allocation), as well as useful ones, such as modular program organization, working with parts of arrays, etc., today this language cannot be called promising for learning, since its syntax is significantly outdated.
    However, for those who quite often have to solve various computational problems, it is not at all necessary to pick up a mathematics textbook every time and “start from scratch.” In 90% of such cases, what you are looking for has long been implemented and debugged in Fortran. Therefore, most likely, the life of Fortran is assured for a long time.
    There is another, relatively young niche for Fortran - parallel computing, where the strict semantics of the language allows you to obtain high-performance programs. Usually the f90 standard is used, slightly expanded with a set of operators to indicate parts of the program suitable for parallelization. Parallel Fortran has its own standard HPF(High Performance Fortran). Nevertheless, Fortran fans, whose motto was the legendary phrase “Why should I learn other languages ​​when I can write everything in Fortran,” felt its obvious unsuitability for large-scale projects due to attachment to the syntax of the 50s, and tried to introduce it fashionable OOP ideas, but object Fortran never emerged as a standard.
    Among the freely distributed versions of Fortran, the most famous is f2c, implemented for all UNIX systems and converting the text of a Fortran program into C code. For DOS there is a version bcf77, distributed free of charge. Of the commercial versions, the first to be noted are Microsoft Fortran, which allows you to create dll libraries, and Watcom Fortran, which generates highly efficient code. For tasks requiring high precision calculations, the MicroWay compiler is designed. In general, Fortran compilers of varying quality are available on absolutely all computer platforms.
    However, Fortran's main merit lies elsewhere. When the need arose to develop very large projects, the shortcomings of Fortran, associated primarily with “heavy” debugging, became unnecessarily burdensome. Therefore, Fortran served as a strong stimulus for the development of the theory of debugging and testing programs. Hundreds of syntactic verifiers for Fortran texts have appeared, catching hidden logical errors. Subsequently, such theoretical areas of programming as equivalent optimizing program transformations, high-level compilation, automatic testing, etc. grew out of this direction. So you can’t forget about Fortran. It probably doesn’t make sense to use it as a toolkit for system integration tasks, but what has been developed the best programmers in 30–40 years, may well speed up the development process. At least, there are now incomparably more software “building blocks” for Fortran than for other programming languages. ■

    * * *
    John Backus born December 3, 1924 in Philadelphia, Pennsylvania, into a wealthy family, spent his childhood in Wilmington. After graduating from school in 1942, he entered the University of Virginia to study chemistry (at the insistence of his father, a chemist), but after some time he stopped studying and in 1943 he was called up for military service.
    Backus began serving in the air defense brigade at Fort Stewart, Georgia, but was subsequently sent to college to study medicine.
    For some time he worked enthusiastically at the city hospital, but in 1946 he lost interest in this work, left the army and moved to New York, although he did not know what to do and how to live further.
    After some time, Backus entered a radio engineering training school. "I had a very good teacher, and he asked me to calculate the characteristics of some circuits. It was terribly tedious, but extremely interesting."
    Soon Backus entered Columbia University (New York) to study mathematics, where he graduated (1949). Shortly before graduating, he visited computer center IBM on Madison Avenue. And here luck smiled at him for the second time - in 1950, Backus became a programmer for IBM.
    IBM's dominance in the computer industry was first discussed in 1952. It all started with the 701, also known as the Defense Calculator. Immediately after the release of the Model 701, specialists from the Applied Research Division began improving it (1955–1956).

    The most serious changes were proposed by John Backus, who later took an active part in the creation of the 704 computer. In particular, thanks to him, the so-called “speed-coding” technology appeared, which made it possible to significantly simplify the writing of programs for the 701. “The possibility of accelerated code generation for machine 701, which was a uniaddress fixed-point computer with no index registers, turned it into a floating-point, random-addressing system with index registers,” Backus recalled. “So users no longer had to struggle with. binary code".
    Even then, the first components of the technology for quickly writing programs appeared, which is used today. In fact, this system became the predecessor of similar complexes that were released in the 50s and 60s and were subsequently replaced by high-level languages.
    And in 1955, Backus “invented” Fortran, the first high-level machine language. Subsequently, recalling this period, Backus will say: “We did not know what to strive for, and did not know how to do it.” Initially, all work was planned to be completed in early 1954, but the development of the language was completed almost two years later.
    The first version of the compiler consisted of 25,000 lines of machine code written on magnetic tape. Each IBM 704 was provided with a copy of the program with a 51-page programming manual.
    In 1959, Backus developed grammatical rules to describe the syntax of high-level languages ​​(Backus-Naur normal form, abbreviated BNF).
    In 1976, John Backus was awarded the National Medal for his contributions to science, and in 1991 he stopped working on computers.

    Vladimir Buslaev

    OCR: fir-vst, 2016

    Among scientists, for example, there is a saying that any math problem already has a solution in Fortran, and, indeed, you can find among thousands of Fortran packages a package for matrix multiplication, a package for solving complex integral equations, and many, many others. A number of such packages have been created over the decades and are still popular in the scientific community to this day, for example - IMSL ( English).

    Most of these libraries are actually the property of humanity: they are available in source code, well documented, debugged and very effective. Therefore, it is expensive to change, let alone rewrite them in other programming languages, despite the fact that attempts are regularly made to automatically convert FORTRAN code into modern programming languages.

    Modern Fortran (Fortran 95 and Fortran 2003) has acquired the features necessary for effective programming for new computing architectures and allows the use modern technologies programming, in particular OOP.

    Evolution of language standards

    Fortran is a highly standardized language, which is why it is easily portable to various platforms. New language standards largely maintain continuity with older ones, which makes it possible to use codes from previously written programs and modify them.

    FORTRAN 66 (1972) Based on the IBM standard FORTRAN IV FORTRAN 77 (1980) Many improvements were introduced: Fortran 90 (1991) The language standard was significantly revised. Fortran 95 (1997) Correction of the previous standard. The FORALL operator and construction have been introduced, allowing more flexibility than the WHERE operator and construction to assign arrays and replace cumbersome loops. FORALL allows you to replace any section assignment or WHERE clause, in particular, it provides access to the diagonal of a matrix. This operator is considered promising in parallel computing, facilitating parallelization more efficient than loops. Fortran 2003 (2004) Further development of OOP support in the language. Interaction with the operating system. The following features have also been added: Fortran 2008 (2010) The standard assumes support by means of the parallel computing language (Co-Arrays Fortran). It is also planned to increase the maximum dimension of arrays to 15, add built-in special mathematical functions, etc.

    Compilers

    Since the initial development of the language, Fortran compilers have been produced by IBM. Currently, IBM supplies the VS Fortran optimizing compiler for IBM System z mainframes, the history of the development of various versions of which dates back to 1964, as well as the XL Fortran compiler for platforms based on the PowerPC-AIX architecture, Linux and the Blue Gene supercomputer (a version was also produced for Mac OS X, when Macintosh computers used PowerPC processors). Both of these compilers contain very complex optimizers, the result of continuous scientific work by IBM specialists over half a century. Based on the IBM Fortran XL compiler, Absoft, an IBM business partner, has created and supplied the Absoft Pro Fortran compiler for systems based on PowerPC (Linux, Mac OS X) and Intel (Linux, Mac OS X, Windows) processors.

    The GNU Free Software Foundation produced an open-source Fortran-77 compiler, g77, available for virtually any platform and fully compatible with GCC. Now it has been replaced by the GFortran compiler, which implements almost all the constructs of the Fortran 95 standard and many constructs of the Fortran 2003 and Fortran 2008 standards. It is also fully backward compatible with Fortran 77. There is also an independent project called g95 to create a Fortran-95 compiler based on GCC.

    Features and structure of the program

    Fortran has a fairly large set of built-in mathematical functions and supports working with integer, real and complex numbers of high precision. Expressive means languages ​​were initially very poor, since Fortran was one of the first high-level languages. Later, many lexical constructs characteristic of structural, functional and even object-oriented programming were added to Fortran.

    Punched card with column markings for Fortran.

    The structure of the programs was initially focused on input from punched cards and had a number of properties convenient for this particular case. Thus, the 1st column served to mark the text as a comment (with the symbol C), from 1st to 5th the label area was located, and from 7th to 72nd the actual text of the operator or comment was located. Columns 73 to 80 could be used to number cards (to restore a randomly scattered deck) or for a brief comment; they were ignored by the translator. If the operator's text did not fit into the allotted space (from the 7th to 72nd column), a continuation sign was placed in the 6th column of the next card, and then the operator continued on it. It was impossible to place two or more statements on one line (map). When punch cards became a thing of history, these advantages turned into serious inconveniences.

    That is why, in the Fortran standard, starting with Fortran 90, in addition to the fixed format of the source text, a free format appeared, which does not regulate line positions, and also allows you to write more than one operator per line. The introduction of a free format made it possible to create code that was as readable and clear as code created using other modern languages programming such as or Java.

    A kind of “calling card” of the old Fortran is the huge number of labels that were used both in unconditional jump operators GOTO and in loop operators, and in format input/output description operators FORMAT. The large number of labels and GOTO statements often made Fortran programs difficult to understand.

    It was this negative experience that became the reason why in a number of modern programming languages ​​(for example, Java), labels and associated unconditional jump operators are greatly modified.

    However, modern Fortran gets rid of the excess of labels due to the introduction of operators such as DO ... END DO, DO WHILE, SELECT CASE. Moreover, modern language standards retain only the classic GOTO operator, which is still used in many languages ​​today. The computed GOTO statement, as well as the ENTRY construct - multiple entry into procedures, have been eliminated.

    Also, the positive features of modern Fortran include a large number of built-in operations with arrays and flexible support for arrays with unusual indexing. Example:

    Real ,dimension (: ,: ) :: V ... allocate (V(- 2 : 2 ,0 : 10 ) ) ! Allocate memory for an array whose indices can ! vary from -2 to 2 (first index) ! and from 0 to 10 - second... V (2 .2 : 3 ) = V (- 1 : 0 .1 ) ! Rotate a piece of an array write(* ,* ) V(1 ,: ) ! Print all elements of array V whose first index is 1. deallocate(V)

    Hello, World!

    Fixed format (spaces in line positions 1 to 6 are marked with “␣” characters):

    ␣␣␣␣␣␣PROGRAM hello ␣␣␣␣␣␣PRINT* , "Hello, World!" ␣␣␣␣␣␣END

    Free format:

    Program hello print * , "Hello, World!" end

    Notes.

    • The PROGRAM statement is optional. Strictly speaking, the only required statement in a Fortran program is the END statement.
    • The choice of uppercase or lowercase letters for writing program statements is arbitrary. From the point of view of modern Fortran language standards, the set of uppercase letters and the set of lowercase letters coincide when writing language statements.

    Interaction with other languages

    Many programming systems allow you to combine object files obtained as a result of translation of a Fortran program with object files obtained from compilers from other languages, which allows you to create more flexible and feature-rich applications. A large number of libraries are also available for the Fortran language, containing both routines for solving classical computing problems (LAPACK, IMSL, BLAS), problems organizing distributed computing (MPI, pvm), and construction problems graphical interfaces(Quickwin, FORTRAN/TK) or access to a DBMS (Oracle).

    Fortran in the USSR

    Notes

    1. See, for example: Netlib Repository at UTK and ORNL
    2. A. M. Gorelik. Evolution of the Fortran programming language (1957-2007) and prospects for its development // Computational methods and programming, 2008, Vol. 9, p. 53-71
    3. Bartenyev O.V. Modern Fortran. - M.: Dialogue MEPhI, 2005. - ISBN 5-86404-113-0
    4. A. M. Gorelik. object-oriented programming in modern Fortran
    5. S. D. Algazin, V. V. Kondratiev. Programming in Visual Fortran. - M.: “Dialogue MEPhI”, 2008. - 448 p. - ISBN 5-8243-0759-8
    6. Gorelik A. M. News
    7. VS FORTRAN
    8. XL Fortran for Linux
    9. Absoft Pro Fortran Compiler Suites General Overview
    10. Sun Studio - Benchmarks
    11. Essay by Alexander Rastorguev about the appearance of Fortran in Dubna
    12. History of computer graphics in Russia

    Literature

    • Fortran. Programmer's Reference Manual. The Fortran Automatic Coding System for the IBM 704 EDPM. - IBM Corp., 1956. - 51 p.
    • ISO/IEC 1539-2:2000 Information technology - Programming languages ​​- Fortran - Part 2: Varying length character strings
    • Robert W. Sebesta. 2.3. IBM computer 704 and the Fortran language // Basic concepts of programming languages ​​= Concepts of Programming Languages ​​/ Transl. from English - 5th ed. - M.: Williams, 2001. - pp. 63-69. - 672 s. - 5000 copies. - ISBN 5-8459-0192-8 (Russian), ISBN 0-201-75295-6 (English)

    Links

    • gfortran - Fortran 95/2003/2008 compiler, part of the GNU Compiler Collection
    • in Progopedia - encyclopedia of programming languages ​​(Russian)

    Alphabet - in programming - a system of indecomposable, confidently distinguishable symbols (letters, numbers, punctuation marks, etc.) used to construct programming languages.

    Syntax is the side of a programming language that describes the structure of programs as sets of characters. The syntax of a language is contrasted with its semantics. The syntax of a language describes “pure” language, while semantics assigns meaning to various syntactic constructions.

    Semantics - in programming - a system of rules for determining the behavior of individual language constructs. Semantics determines the semantic meaning of sentences in an algorithmic language.

    Low-level programming languages ​​– Autocode, Assembly,

    High-level programming languages ​​- Fortran, Algol, Cobol, Pascal, BASIC, C++, Prolog

    Ultra-high level programming languages ​​– APL, ALGOL-68

    Computational programming languages ​​- Fortran, Pascal, Algol, BASIC, C

    Symbolic processing languages ​​– Lisp, Prolog, Snoball, etc.

    First generation languages:

    Machine codes were the first generation programming language

    Second generation languages:

    Assembler

    Third generation languages:

    these languages ​​are often designated as "high" level languages.

    Fourth generation languages:

    BASIC, COBOL, C and Pascal

    Fifth generation programming languages:

    Prolog, LISP, C++, Visual Basic, Delphi.

    Fortran programming language

    The first high-level programming language with a translator. Created between 1954 and 1957 by a group of programmers led by John Backus at IBM. The name Fortran is an acronym for FORmula TRANslator (formula translator). Fortran is widely used primarily for scientific and engineering computing. One of the advantages of modern Fortran is the large number of programs and subroutine libraries written in it. Most of these libraries are actually the property of humanity: they are available in source code, well documented, debugged and very effective. Therefore, it is expensive to change, let alone rewrite them in other programming languages, despite the fact that attempts are regularly made to automatically convert FORTRAN code into modern programming languages.

    Modern Fortran (Fortran 95 and Fortran 2003) has acquired the features necessary for effective programming for new computing architectures and allows the use of modern programming technologies, in particular OOP.

    Evolution of language standards

    Fortran is a highly standardized language, which is why it is easily portable to various platforms. New language standards largely maintain continuity with older ones, which makes it possible to use codes from previously written programs and modify them.

    FORTRAN 77 (1980)

    Many improvements have been introduced:

    Operators for opening and closing a file (OPEN, CLOSE) and output to a standard device - PRINT have been introduced.

    Added string data type and functions for processing it.

    The IF block operator and the IF THEN - ELSE IF THEN - END IF construction were introduced, as well as the INCLUDE program fragment inclusion operator.

    The ability to work with direct access files has been introduced.

    The maximum array size has been increased from 3 to 7. Restrictions on array indices have been removed.

    The capabilities of working with procedures have been improved and expanded.

    The concept of an internal file (which includes arrays, numeric and string variables) has been introduced. Internal files allow, in particular, number-to-string and line-to-number conversion using standard read and write operators READ and WRITE.

    Fortran 90 (1991)

    The language standard has been significantly revised.

    A free format for writing code has been introduced. Additional descriptions for IMPLICIT NONE, TYPE, ALLOCATABLE, POINTER, TARGET, NAMELIST have appeared.

    Control operators and constructions are introduced. Added DO ... END DO (instead of ending the loop with a label), DO WHILE, a control transfer statement to the beginning of the CYCLE loop, a SELECT CASE selection construct (to replace cumbersome IF constructs and GOTO statements), as well as the final statement of a program unit, modular or internal procedure END .

    A set of pointer tools and functions for working with RAM has been introduced (similar to the C language).

    Operators for working with dynamic memory have been introduced (ALLOCATE, DEALLOCATE, NULLIFY).

    Added software components MODULE, PRIVATE, PUBLIC, CONTAINS, INTERFACE, USE, INTENT.

    Masking of array assignments has been introduced (assignment when executing a logical condition imposed on array elements without using condition operators), as well as working with array sections. The operator and WHERE construct were introduced for partial replacement of cycles ( right side assignment operator does not change). Assignment masking applies to almost all operators, constructs, and functions that operate on arrays.

    The standard operations of assignment, addition, subtraction, as well as division and multiplication by a number are extended to arrays and their sections defined by sections. In this case, element-wise assignment is performed.

    New built-in functions have appeared, primarily for working with arrays. Functions for calculations in arrays: ALL (logical product) and MASK (logical addition), COUNT (number of true elements), PRODUCT (product of array elements), SUM (addition of array elements), DOT_PRODUCT (scalar product), MATMUL (matrix multiplication ). Help functions have been added, as well as functions for reforming and folding arrays.

    Elements of OOP appeared in the language. Derived data types have been introduced. A separate list of obsolete language features that are intended to be removed in the future has been announced.

    Added additional features for working with string data, in particular, the TRIM (removing trailing spaces) and REPEAT (multiple copying of a string) functions and the left and right alignment functions.

    Fortran 95 (1997)

    Correction of the previous standard. The FORALL operator and construction have been introduced, allowing more flexibility than the WHERE operator and construction to assign arrays and replace cumbersome loops. FORALL allows you to replace any section assignment or WHERE clause, in particular, it provides access to the diagonal of a matrix. This operator is considered promising in parallel computing, facilitating parallelization more efficient than loops.

    Fortran 2003 (2004)

    Further development of OOP support in the language. Interaction with the operating system. The following features have also been added:

    Asynchronous data input/output.

    C Interface Tools

    Improving dynamic data placement

    The standard assumes support by means of the parallel computing language (Co-Arrays Fortran). It is also planned to increase the maximum dimension of arrays to 15, add built-in special mathematical functions, etc.