![]() ![]() Fortran - Wikipedia. Fortran. The Fortran Automatic Coding System for the IBM 7. October 1. 95. 6), the first Programmer's Reference Manual for Fortran. Paradigmmulti- paradigm: structured, imperative (procedural, object- oriented), generic. Designed by. John Backus. Developer. John Backus and IBMFirst appeared. LF Fortran v7.7 Professional Delivers! LF Fortran PRO includes the Lahey/Fujitsu Fortran 95 compiler, the 32/64 bit Lahey/GNU compiler and adds Microsoft's Visual. Stable release. Fortran 2. ISO/IEC 1. 53. 9- 1: 2. Typing disciplinestrong, static, manifest. Filename extensions. Major implementations. Absoft, Cray, GFortran, G9. IBM XL Fortran, Intel, Hitachi, Lahey/Fujitsu, Numerical Algorithms Group, Open Watcom, Path. Scale, PGI, Silverfrost, Oracle Solaris Studio, Visual Fortran, others. Influenced by. Speedcoding. Influenced. ALGOL 5. BASIC, C, Chapel. Originally developed by IBM. It is a popular language for high- performance computing.
Successive versions have added support for structured programming and processing of character- based data (FORTRAN 7. Fortran 9. 0), high performance Fortran (Fortran 9. Fortran 2. 00. 3) and concurrent programming (Fortran 2. The names of earlier versions of the language through FORTRAN 7. FORTRAN 7. 7 was the last version in which the use of lowercase letters in keywords was strictly non- standard). The capitalization has been dropped in referring to newer versions beginning with Fortran 9. The official language standards now refer to the language as . Backus submitted a proposal to his superiors at IBM to develop a more practical alternative to assembly language for programming their IBM 7. Backus' historic FORTRAN team consisted of programmers Richard Goldberg, Sheldon F. Best, Harlan Herrick, Peter Sheridan, Roy Nutt, Robert Nelson, Irving Ziller, Lois Haibt, and David Sayre. Halcombe Laning and demonstrated in the Laning and Zierler system of 1. The first manual for FORTRAN appeared in October 1. FORTRAN compiler delivered in April 1. This was the first optimizing compiler, because customers were reluctant to use a high- level programming language unless its compiler could generate code with performance comparable to that of hand- coded assembly language. John Backus said during a 1. Think, the IBM employee magazine, . I didn't like writing programs, and so, when I was working on the IBM 7. I started work on a programming system to make it easier to write programs. The inclusion of a complex number data type in the language made Fortran especially suited to technical applications such as electrical engineering. By 1. 96. 0, versions of FORTRAN were available for the IBM 7. Significantly, the increasing popularity of FORTRAN spurred competing computer manufacturers to provide FORTRAN compilers for their machines, so that by 1. FORTRAN compilers existed. For these reasons, FORTRAN is considered to be the first widely used programming language supported across a variety of computer architectures. The development of FORTRAN paralleled the early evolution of compiler technology, and many advances in the theory and design of compilers were specifically motivated by the need to generate efficient code for FORTRAN programs. FORTRAN. However, the 7. TZE – Transfer AC Zero, TNZ – Transfer AC Not Zero, TPL – Transfer AC Plus, TMI – Transfer AC Minus). The machine (and its successors in the 7. CAS – Compare AC with Storage), but using this instruction to implement the IF would consume 4 instruction words, require the constant Zero in a word of storage, and take 3 machine cycles to execute; using the Transfer instructions to implement the IF could be done in 1 to 3 instruction words, required no constants in storage, and take 1 to 3 machine cycles to execute. An optimizing compiler like FORTRAN would most likely select the more compact and usually faster Transfers instead of the Compare (use of Transfers also allowed the FREQUENCY statement to optimize IFs, which could not be done using the Compare). Also the Compare considered . The FREQUENCY statement in FORTRAN was used originally (and optionally) to give branch probabilities for the three branch cases of the arithmetic IF statement. The first FORTRAN compiler used this weighting to perform at compile time a Monte Carlo simulation of the generated code, the results of which were used to optimize the placement of basic blocks in memory – a very sophisticated optimization for its time. IBM Software is designed to solve the most challenging needs of organizations large and small, across all industries, worldwide. The Monte Carlo technique is documented in Backus et al.'s paper on this original implementation, The FORTRAN Automatic Coding System: The fundamental unit of program is the basic block; a basic block is a stretch of program which has one entry point and one exit point. The purpose of section 4 is to prepare for section 5 a table of predecessors (PRED table) which enumerates the basic blocks and lists for every basic block each of the basic blocks which can be its immediate predecessor in flow, together with the absolute frequency of each such basic block link. This table is obtained by running the program once in Monte- Carlo fashion, in which the outcome of conditional transfers arising out of IF- type statements and computed GO TO's is determined by a random number generator suitably weighted according to whatever FREQUENCY statements have been provided. A similar fate has befallen compiler hints in several other programming languages; for example C's register keyword. That code could be looked up by the programmer in an error messages table in the operator's manual, providing them with a brief description of the problem. The resulting deck of cards would be fed into a card reader to be compiled. Punched- card codes included no lower- case letters or many special characters, and special versions of the IBM 0. Fortran. Reflecting punched- card input practice, Fortran programs were originally written in a fixed- column format, with the first 7. A letter . Otherwise, the columns of the card were divided into four fields: 1 to 5 were the label field: a sequence of digits here was taken as a label for use in DO or control statements such as GO TO and IF, or to identify a FORMAT statement referred to in a WRITE or READ statement. Leading zeros are ignored and 0 is not a valid label number. The continuation cards were usually numbered 1, 2, etc. An IBM 5. 19 could be used to copy a program deck and add sequence numbers. Some early compilers, e. IBM 6. 50's, had additional restrictions due to limitations on their card readers. Later compilers relaxed most fixed- format restrictions, and the requirement was eliminated in the Fortran 9. Within the statement field, whitespace characters (blanks) were ignored outside a text literal. This allowed omitting spaces between tokens for brevity or including spaces within identifiers for clarity. For example, AVGOFX was a valid identifier, equivalent to AVGOFX, and 1. DO1. 01. I=1,1. 01 was a valid statement, equivalent to 1. DO1. 01. I=1,1. 01 because the zero in column 6 is treated as if it were a space (!), while 1. DO1. 01. I=1. 1. 01 was instead 1. DO1. 01. I=1. 1. 01, the assignment of 1. DO1. 01. I. Note the slight visual difference between a comma and a period. Hollerith strings, originally allowed only in FORMAT and DATA statements, were prefixed by a character count and the letter H (e. HTHISISALPHANUMERICDATA.), allowing blanks to be retained within the character string. Miscounts were a problem. FORTRAN II. The main enhancement was to support procedural programming by allowing user- written subroutines and functions which returned values, with parameters passed by reference. The COMMON statement provided a way for subroutines to access common (or global) variables. Six new statements were introduced: SUBROUTINE, FUNCTION, and ENDCALL and RETURNCOMMONOver the next few years, FORTRAN II would also add support for the DOUBLE PRECISION and COMPLEX data types. Early FORTRAN compilers supported no recursion in subroutines. Early computer architectures supported no concept of a stack, and when they did directly support subroutine calls, the return location was often stored in one fixed location adjacent to the subroutine code (e. Although not specified in Fortran 7. F7. 7 compilers supported recursion as an option, and the Burroughs mainframes, designed with recursion built- in, did so by default. It became a standard in Fortran 9. RECURSIVE. There are no . If A, B, and C cannot represent the sides of a triangle in plane geometry, then the program's execution will end with an error code of . Otherwise, an output line will be printed showing the input values for A, B, and C, followed by the computed AREA of the triangle as a floating- point number occupying ten spaces along the line of output and showing 2 digits after the decimal point, the . F1. 0. 2 of the FORMAT statement with label 6. C AREA OF A TRIANGLE WITH A STANDARD SQUARE ROOT FUNCTIONC INPUT - TAPE READER UNIT 5, INTEGER INPUTC OUTPUT - LINE PRINTER UNIT 6, REAL OUTPUTC INPUT ERROR DISPLAY ERROR OUTPUT CODE 1 IN JOB CONTROL LISTINGREAD INPUTTAPE5,5. IA,IB,IC 5. 01. FORMAT(3. I5)C IA, IB, AND IC MAY NOT BE NEGATIVE OR ZEROC FURTHERMORE, THE SUM OF TWO SIDES OF A TRIANGLEC MUST BE GREATER THAN THE THIRD SIDE, SO WE CHECK FOR THAT, TOOIF(IA)7. IF(IB)7. 77,7. 77,7. IF(IC)7. 77,7. 77,7. IF(IA+IB- IC)7. 77,7. IF(IA+IC- IB)7. 77,7. IF(IB+IC- IA)7. 77,7. STOP 1. C USING HERON'S FORMULA WE CALCULATE THEC AREA OF THE TRIANGLE 7. S=FLOATF(IA+IB+IC)/2. AREA=SQRTF(S*(S- FLOATF(IA))*(S- FLOATF(IB))*+(S- FLOATF(IC)))WRITE OUTPUTTAPE6,6. IA,IB,IC,AREA 6. 01. FORMAT(4. HA=,I5,5. HB=,I5,5. HC=,I5,8. HAREA=,F1. 0. 2,+1. HSQUAREUNITS)STOPENDFORTRAN III. Now obsolete. IBM also developed a FORTRAN III in 1. Like the 7. 04 FORTRAN and FORTRAN II, FORTRAN III included machine- dependent features that made code written in it unportable from machine to machine. Early versions of FORTRAN provided by other vendors suffered from the same disadvantage. IBM 1. 40. 1 FORTRAN. The compiler could be run from tape, or from a 2. It kept the program in memory and loaded overlays that gradually transformed it, in place, into executable form, as described by Haines.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
August 2017
Categories |