fortran fortran frtrn formerly fortran derived from formula translation is a generalpurpose compiled imperative programming language that is especially suited to numeric computation and scientific computing originally developed by ibm fortran encompasses a lineage of versions each of which evolved to add extensions to the language while usually retaining compatibility with prior versions successive versions have added support for structured programming and processing of characterbased data fortran 77 array programming modular programming and generic programming fortran 90 high performance fortran fortran 95 objectoriented programming fortran 2003 and concurrent programming fortran 2008 fortrans design was the basis for many other programming languages among the better known is basic which is based on fortran ii with a number of syntax cleanups notably better logical structures naming the names of earlier versions of the language through fortran 77 were conventionally spelled in allcapitals fortran 77 was the last version in which the use of lowercase letters in keywords was strictly nonstandard the capitalization has been dropped in referring to newer versions beginning with fortran 90 the official language standards now refer to the language as fortran rather than allcaps fortran history an ibm 704 mainframe computer in late 1953 john w backus submitted a proposal to his superiors at ibm to develop a more practical alternative to assembly language for programming their ibm 704 mainframe computer a draft specification for the ibm mathematical formula translating system was completed by november 1954 while the community was skeptical that this new method could possibly outperform handcoding it reduced the number of programming statements necessary to operate a machine by a factor of 20 and quickly gained acceptance john backus said during a 1979 interview with think the ibm employee magazine much of my work has come from being lazy i didnt like writing programs and so when i was working on the ibm 701 writing programs for computing missile trajectories i started work on a programming system to make it easier to write programs the language was widely adopted by scientists for writing numerically intensive programs which encouraged compiler writers to produce compilers that could generate faster and more efficient code the inclusion of a complex number data type in the language made fortran especially suited to technical applications such as electrical engineering by 1960 versions of fortran were available for the ibm 709 650 1620 and 7090 computers significantly the increasing popularity of fortran spurred competing computer manufacturers to provide fortran compilers for their machines so that by 1963 over 40 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 the initial release of fortran for the ibm 704 contained 32 statements including dimension and equivalence statements assignment statements threeway arithmetic if statement which passed control to one of three locations in the program depending on whether the result of the arithmetic statement was negative zero or positive if statements for checking exceptions accumulator overflow quotient overflow and divide check and if statements for manipulating sense switches and sense lights go to computed go to assign and assigned go to do loops formatted io format read read input tape write write output tape print and punch unformatted io read tape read drum write tape and write drum other io end file rewind and backspace pause stop and continue frequency statement for providing optimization hints to the compiler the arithmetic if statement was reminiscent of but not readily implementable by a threeway comparison instruction cas compare accumulator with storage available on the 704 the statement provided the only way to compare numbers by testing their difference with an attendant risk of overflow this deficiency was later overcome by logical facilities introduced in fortran iv the frequency statement 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 the monte carlo technique is documented in backus et als 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 montecarlo fashion in which the outcome of conditional transfers arising out of iftype statements and computed go tos is determined by a random number generator suitably weighted according to whatever frequency statements have been provided many years later the frequency statement had no effect on the code and was treated as a comment statement since the compilers no longer did this kind of compiletime simulation a similar fate has befallen compiler hints in several other programming languages for example cs register keyword the first fortran compiler reported diagnostic information by halting the program when an error was found and outputting an error code on its console that code could be looked up by the programmer in an error messages table in the operators manual providing them with a brief description of the problem fixed layout and punched cards fortran code on a punched card showing the specialized uses of columns 15 6 and 7380 further information computer programming in the punched card era before the development of disk files text editors and terminals programs were most often entered on a keypunch keyboard onto 80column punched cards one line to a card the resulting deck of cards would be fed into a card reader to be compiled punched card codes included no lowercase letters or many special characters and special versions of the ibm 026 keypunch were offered that would correctly print the repurposed special characters used in fortran reflecting punched card input practice fortran programs were originally written in a fixedcolumn format with the first 72 columns read into twelve 36bit words a letter c in column 1 caused the entire card to be treated as a comment and ignored by the compiler 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 6 was a continuation field a character other than a blank or a zero here caused the card to be taken as a continuation of the statement on the prior card the continuation cards were usually numbered 1 2 etc and the starting card might therefore have zero in its continuation column which is not a continuation of its preceding card 7 to 72 served as the statement field 73 to 80 were ignored the ibm 704s card reader only used 72 columns columns 73 to 80 could therefore be used for identification information such as punching a sequence number or text which could be used to reorder cards if a stack of cards was dropped though in practice this was reserved for stable production programs an ibm 519 could be used to copy a program deck and add sequence numbers some early compilers eg the ibm 650s had additional restrictions due to limitations on their card readers keypunches could be programmed to tab to column 7 and skip out after column 72 later compilers relaxed most fixedformat restrictions and the requirement was eliminated in the fortran 90 standard 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 avg of x was a valid identifier equivalent to avgofx and 101010do101i1101 was a valid statement equivalent to 10101 do 101 i 1 101 because the zero in column 6 is treated as if it were a space while 101010do101i1101 was instead 10101 do101i 1101 the assignment of 1101 to a variable called do101i 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 eg 26hthis is alphanumeric data allowing blanks to be retained within the character string miscounts were a problem fortran ii ibms fortran ii appeared in 1958 the main enhancement was to support procedural programming by allowing userwritten 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 end call and return common over 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 eg the ibm 1130 or a specific machine register ibm 360 et seq which only allows recursion if a stack is maintained by software and the return address is stored on the stack before the call is made and restored after the call returns although not specified in fortran 77 many f77 compilers supported recursion as an option and the burroughs mainframes designed with recursion builtin did so by default it became a standard in fortran 90 via the new keyword recursive simple fortran ii program this program for herons formula reads data on a tape reel containing three 5digit integers a b and c as input there are no type declarations available variables whose name starts with i j k l m or n are fixedpoint ie integers otherwise floatingpoint since integers are to be processed in this example the names of the variables start with the letter i the name of a variable must start with a letter and can continue with both letters and digits up to a limit of six characters in fortran ii if a b and c cannot represent the sides of a triangle in plane geometry then the programs execution will end with an error code of stop 1 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 floatingpoint number occupying ten spaces along the line of output and showing 2 digits after the decimal point the 2 in f102 of the format statement with label 601 c area of a triangle with a standard square root function c input tape reader unit 5 integer input c output line printer unit 6 real output c input error display error output code 1 in job control listing read input tape 5 501 ia ib ic 501 format 3i5 c ia ib and ic may not be negative or zero c furthermore the sum of two sides of a triangle c must be greater than the third side so we check for that too if ia 777 777 701 701 if ib 777 777 702 702 if ic 777 777 703 703 if iaibic 777 777 704 704 if iaicib 777 777 705 705 if ibicia 777 777 799 777 stop 1 c using herons formula we calculate the c area of the triangle 799 s floatf ia ib ic 20 area sqrtf s s floatfia s floatfib s floatfic write output tape 6 601 ia ib ic area 601 format 4h a i55h b i55h c i58h area f102 13h square units stop end fortran iii a fortran coding form printed on paper and intended to be used by programmers to prepare programs for punching onto cards by keypunch operators now obsolete ibm also developed a fortran iii in 1958 that allowed for inline assembly code among other features however this version was never released as a product like the 704 fortran and fortran ii fortran iii included machinedependent features that made code written in it unportable from machine to machine76 early versions of fortran provided by other vendors suffered from the same disadvantage ibm 1401 fortran fortran was provided for the ibm 1401 computer by an innovative 63phase compiler that ran entirely in its core memory of only 8000 sixbit characters the compiler could be run from tape or from a 2200card deck it used no further tape or disk storage it kept the program in memory and loaded overlays that gradually transformed it in place into executable form as described by haines this article was reprinted edited in both editions of anatomy of a compiler the executable form was not entirely machine language rather floatingpoint arithmetic subscripting inputoutput and function references were interpreted preceding ucsd pascal pcode by two decades ibm later provided a fortran iv compiler for the 1400 series of computers fortran iv starting in 1961 as a result of customer demands ibm began development of a fortran iv that removed the machinedependent features of fortran ii such as read input tape while adding new features such as a logical data type logical boolean expressions and the logical if statement as an alternative to the arithmetic if statement fortran iv was eventually released in 1962 first for the ibm 7030 stretch computer followed by versions for the ibm 7090 ibm 7094 and later for the ibm 1401 in 1966 by 1965 fortran iv was supposed to be compliant with the standard being developed by the american standards association x343 fortran working group at about this time fortran iv had started to become an important educational tool and implementations such as the university of waterloos watfor and watfiv were created to simplify the complex compile and link processes of earlier compilers fortran 66 perhaps the most significant development in the early history of fortran was the decision by the american standards association now american national standards institute ansi to form a committee sponsored by bema the business equipment manufacturers association to develop an american standard fortran the resulting two standards approved in march 1966 defined two languages fortran based on fortran iv which had served as a de facto standard and basic fortran based on fortran ii but stripped of its machinedependent features the fortran defined by the first standard officially denoted x391966 became known as fortran 66 although many continued to term it fortran iv the language on which the standard was largely based fortran 66 effectively became the first industrystandard version of fortran fortran 66 included main program subroutine function and block data program units integer real double precision complex and logical data types common dimension and equivalence statements data statement for specifying initial values intrinsic and external eg library functions assignment statement go to computed go to assigned go to and assign statements logical if and arithmetic threeway if statements do loop statement read write backspace rewind and endfile statements for sequential io format statement and assigned format call return pause and stop statements hollerith constants in data and format statements and as arguments to procedures identifiers of up to six characters in length comment lines end line fortran 77 fortran77 program with compiler output written on a cdc 175 at rwth aachen university germany in 1987 43 bsd for the digital equipment corporation dec vax displaying the manual for fortran 77 f77 compiler after the release of the fortran 66 standard compiler vendors introduced several extensions to standard fortran prompting ansi committee x3j3 in 1969 to begin work on revising the 1966 standard under sponsorship of cbema the computer business equipment manufacturers association formerly bema final drafts of this revised standard circulated in 1977 leading to formal approval of the new fortran standard in april 1978 the new standard called fortran 77 and officially denoted x391978 added a number of significant features to address many of the shortcomings of fortran 66 block if and end if statements with optional else and else if clauses to provide improved language support for structured programming do loop extensions including parameter expressions negative increments and zero trip counts open close and inquire statements for improved io capability directaccess file io implicit statement to override implicit conventions that undeclared variables are integer if their name begins with i j k l m or n and real otherwise character data type replacing hollerith strings with vastly expanded facilities for character input and output and processing of characterbased data parameter statement for specifying constants save statement for persistent local variables generic names for intrinsic functions eg sqrt also accepts arguments of other types such as complex or real16 a set of intrinsics lge lgt lle llt for lexical comparison of strings based upon the ascii collating sequence these ascii functions were demanded by the us department of defense in their conditional approval vote in this revision of the standard a number of features were removed or altered in a manner that might invalidate formerly standardconforming programs removal was the only allowable alternative to x3j3 at that time since the concept of deprecation was not yet available for ansi standards while most of the 24 items in the conflict list see appendix a2 of x391978 addressed loopholes or pathological cases permitted by the prior standard but rarely used a small number of specific capabilities were deliberately removed such as hollerith constants and hollerith data such as greet 12hhello there reading into an h edit hollerith field descriptor in a format specification overindexing of array bounds by subscripts dimension a105 y a111 transfer of control out of and back into the range of a do loop also known as extended range variants minnesota fortran control data corporation computers had another version of fortran 77 called minnesota fortran mnf designed especially for student use with variations in output constructs special uses of commons and data statements optimizations code levels for compiling and detailed error listings extensive warning messages and debugs transition to ansi standard fortran the development of a revised standard to succeed fortran 77 would be repeatedly delayed as the standardization process struggled to keep up with rapid changes in computing and programming practice in the meantime as the standard fortran for nearly fifteen years fortran 77 would become the historically most important dialect an important practical extension to fortran 77 was the release of milstd1753 in 1978 this specification developed by the us department of defense standardized a number of features implemented by most fortran 77 compilers but not included in the ansi fortran 77 standard these features would eventually be incorporated into the fortran 90 standard do while and end do statements include statement implicit none variant of the implicit statement bit manipulation intrinsic functions based on similar functions included in industrial realtime fortran ansiisa s611 1976 the ieee 10039 posix standard released in 1991 provided a simple means for fortran 77 programmers to issue posix system calls over 100 calls were defined in the document allowing access to posixcompatible process control signal handling file system control device control procedure pointing and stream io in a portable manner fortran 90 the muchdelayed successor to fortran 77 informally known as fortran 90 and prior to that fortran 8x was finally released as isoiec standard 15391991 in 1991 and an ansi standard in 1992 in addition to changing the official spelling from fortran to fortran this major revision added many new features to reflect the significant changes in programming practice that had evolved since the 1978 standard freeform source input also with lowercase fortran keywords identifiers up to 31 characters in length in the previous standard it was only six characters inline comments ability to operate on arrays or array sections as a whole thus greatly simplifying math and engineering computations whole partial and masked array assignment statements and array expressions such as x1nr1ncosa1n where statement for selective array assignment arrayvalued constants and expressions userdefined arrayvalued functions and array constructors recursive procedures modules to group related procedures and data together and make them available to other program units including the capability to limit the accessibility to only specific parts of the module a vastly improved argumentpassing mechanism allowing interfaces to be checked at compile time userwritten interfaces for generic procedures operator overloading derived structured data types new data type declaration syntax to specify the data type and other attributes of variables dynamic memory allocation by means of the allocatable attribute and the allocate and deallocate statements pointer attribute pointer assignment and nullify statement to facilitate the creation and manipulation of dynamic data structures structured looping constructs with an end do statement for loop termination and exit and cycle statements for terminating normal do loop iterations in an orderly way select case construct for multiway selection portable specification of numerical precision under the users control new and enhanced intrinsic procedures obsolescence and deletions unlike the prior revision fortran 90 removed no features appendix b1 says the list of deleted features in this standard is empty any standardconforming fortran 77 program is also standardconforming under fortran 90 and either standard should be usable to define its behavior a small set of features were identified as obsolescent and expected to be removed in a future standard all of the functionalities of these early version features are performed by new fortran 95 features some are kept to simplify porting of old programs but may eventually be deleted obsolescent feature example statusfate in fortran 95 arithmetic ifstatement if x 10 20 30 deprecated noninteger do parameters or control variables do 9 x 17 16 01 deleted shared doloop termination or termination with a statement other than end do or continue do 9 j 1 10 do 9 k 1 10 9 l j k deprecated branching to end if from outside a block 66 go to 77 if e then 77 end if deleted alternate return call subr x y 100 200 deprecated pause statement pause 600 deleted assign statement and assigned go to statement 100 assign 100 to h go to h deleted assigned statement numbers and format specifiers assign 606 to f write 6 f deleted h edit descriptors 606 format 9h1goodbye deleted computed go to statement go to 10 20 30 40 index obsolete statement functions foil x y x2 2xy y2 obsolete data statements among executable statements x 273 data a b c 50 120 130 obsolete character form of character declaration character8 string use character8 obsolete assumed character length functions character string obsolete fixed form source code column 1 contains c or or for comments columns 1 through 5 for statement numbers any character in column 6 for continuation columns 73 and up ignored obsolete hello world example program helloworld print hello world end program helloworld fortran 95 f95 redirects here for the dsseldorfbased football club see fortuna dsseldorf fortran 95 language features fortran 95 published officially as isoiec 153911997 was a minor revision mostly to resolve some outstanding issues from the fortran 90 standard nevertheless fortran 95 also added a number of extensions notably from the high performance fortran specification forall and nested where constructs to aid vectorization userdefined pure and elemental procedures default initialization of derived type components including pointer initialization expanded the ability to use initialization expressions for data objects initialization of pointers to null clearly defined that allocatable arrays are automatically deallocated when they go out of scope a number of intrinsic functions were extended for example a dim argument was added to the maxloc intrinsic several features noted in fortran 90 to be obsolescent were removed from fortran 95 do statements using real and double precision index variables branching to an end if statement from outside its block pause statement assign and assigned go to statement and assigned format specifiers h edit descriptor an important supplement to fortran 95 was the iso technical report tr15581 enhanced data type facilities informally known as the allocatable tr this specification defined enhanced use of allocatable arrays prior to the availability of fully fortran 2003compliant fortran compilers such uses include allocatable arrays as derived type components in procedure dummy argument lists and as function return values allocatable arrays are preferable to pointerbased arrays because allocatable arrays are guaranteed by fortran 95 to be deallocated automatically when they go out of scope eliminating the possibility of memory leakage in addition elements of allocatable arrays are contiguous and aliasing is not an issue for optimization of array references allowing compilers to generate faster code than in the case of pointers another important supplement to fortran 95 was the iso technical report tr15580 floatingpoint exception handling informally known as the ieee tr this specification defined support for ieee floatingpoint arithmetic and floating point exception handling conditional compilation and varying length strings in addition to the mandatory base language defined in isoiec 15391 1997 the fortran 95 language also includes two optional modules varying length character strings isoiec 15392 2000 conditional compilation isoiec 15393 1998 which together compose the multipart international standard isoiec 1539 according to the standards developers the optional parts describe selfcontained features which have been requested by a substantial body of users andor implementors but which are not deemed to be of sufficient generality for them to be required in all standardconforming fortran compilers nevertheless if a standardconforming fortran does provide such options then they must be provided in accordance with the description of those facilities in the appropriate part of the standard fortran 2003 fortran 2003 officially published as isoiec 153912004 is a major revision introducing many new features from that article the major enhancements for this revision include derived type enhancements parameterized derived types improved control of accessibility improved structure constructors and finalizers objectoriented programming support type extension and inheritance polymorphism dynamic type allocation and typebound procedures providing complete support for abstract data types data manipulation enhancements allocatable components incorporating tr 15581 deferred type parameters volatile attribute explicit type specification in array constructors and allocate statements pointer enhancements extended initialization expressions and enhanced intrinsic procedures inputoutput 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 procedure pointers support for ieee floatingpoint arithmetic and floating point exception handling incorporating tr 15580 interoperability with the c programming language support for international usage access to iso 10646 4byte characters and choice of decimal or comma in numeric formatted inputoutput enhanced integration with the host operating system access to command line arguments environment variables and processor error messages an important supplement to fortran 2003 was the iso technical report tr19767 enhanced module facilities in fortran this report provided submodules which make fortran modules more similar to modula2 modules they are similar to ada private child subunits this allows the specification and implementation of a module to be expressed in separate program units which improves packaging of large libraries allows preservation of trade secrets while publishing definitive interfaces and prevents compilation cascades fortran 2008 the most recent standard isoiec 153912010 informally known as fortran 2008 was approved in september 2010 as with fortran 95 this is a minor upgrade incorporating clarifications and corrections to fortran 2003 as well as introducing a select few new capabilities the new capabilities include submodules additional structuring facilities for modules supersedes isoiec tr 197672005 coarray fortran a parallel execution model the do concurrent construct for loop iterations with no interdependencies the contiguous attribute to specify storage layout restrictions the block construct can contain declarations of objects with construct scope recursive allocatable components as an alternative to recursive pointers in derived types the final draft international standard fdis is available as document n1830 an important supplement to fortran 2008 is the iso technical specification ts 29113 on further interoperability of fortran with c which has been submitted to iso in may 2012 for approval the specification adds support for accessing the array descriptor from c and allows ignoring the type and rank of arguments fortran 2018 the next revision of the language fortran 2018 was earlier referred to as fortran 2015 fortran 2018 incorporates two previously published technical specifications isoiec ts 291132012 further interoperability with c isoiec ts 185082015 additional parallel features in fortran additional changes and new features include support for isoiecieee 605592011 hexadecimal inputoutput implicit none enhancements and other changes science and engineering although a 1968 journal article by the authors of basic already described fortran as oldfashioned it is the primary language for some of the most intensive supercomputing tasks such as in astronomy climate modeling computational chemistry computational economics computational fluid dynamics computational physics data analysis hydrological modeling numerical linear algebra and numerical libraries lapack imsl and nag optimization satellite simulation structural engineering and weather prediction many of the floatingpoint benchmarks to gauge the performance of new computer processors such as cfp2006 the floatingpoint component of the spec cpu2006 benchmarks are written in fortran apart from this more modern codes in computational science generally use large program libraries such as metis for graph partitioning petsc or trilinos for linear algebra capabilities dune or fenics for mesh and finite element support and other generic libraries since the late 1990s almost all of the most widely used support libraries have been written in c and more often c on the other hand highlevel languages such as matlab python or r are becoming popular in particular areas of computational science consequently a growing fraction of scientific programs are also written in these languages for this reason facilities for interoperation with c were added to fortran 2003 and enhanced by isoiec technical specification 29113 which will be incorporated into fortran 2018 this shift in the popularity of programming languages is also evident in the selection of applications between the spec cpu 2000 and spec cpu 2006 floating point benchmarks software for nasa probes voyager 1 and voyager 2 was originally written in fortran 5 and later ported to fortran 77 as of 25september2013 language features the precise characteristics and syntax of fortran 95 are discussed in fortran 95 language features portability portability was a problem in the early days because there was no agreed upon standard not even ibms reference manual and computer companies vied to differentiate their offerings from others by providing incompatible features standards have improved portability the 1966 standard provided a reference syntax and semantics but vendors continued to provide incompatible extensions although careful programmers were coming to realize that use of incompatible extensions caused expensive portability problems and were therefore using programs such as the pfort verifier incompatible extensions were not the only portability problem for numerical calculations it is important to take account of the characteristics of the arithmetic this was addressed by fox et al in the context of the 1966 standard by the port library the ideas therein became widely used and were eventually incorporated into the 1990 standard by way of intrinsic inquiry functions the widespread now almost universal adoption of the ieee 754 standard for binary floatingpoint arithmetic has essentially removed this problem access to the computing environment eg the programs command line environment variables textual explanation of error conditions remained a problem until it was addressed by the 2003 standard large collections of library software that could be described as being loosely related to engineering and scientific calculations such as graphics libraries have been written in c and therefore access to them presented a portability problem this has been addressed by incorporation of c interoperability into the 2003 standard it is now possible and relatively easy to write an entirely portable program in fortran even without recourse to a preprocessor variants fortran 5 fortran 5 was marketed by data general corp in the late 1970s and early 1980s for the nova eclipse and mv line of computers it had an optimizing compiler that was quite good for minicomputers of its time the language most closely resembles fortran 66 the name is a pun on the earlier fortran iv fortran v fortran v was distributed by control data corporation in 1968 for the cdc 6600 series the language was based upon fortran iv univac also offered a compiler for the 1100 series known as fortran v a spinoff of univac fortran v was athena fortran fortran 6 fortran 6 or visual fortran 2001 was licensed to compaq by microsoft they have licensed compaq visual fortran and have provided the visual studio 5 environment interface for compaq v6 up to v61 specific variants vendors of highperformance scientific computers eg burroughs control data corporation cdc cray honeywell ibm texas instruments and univac added extensions to fortran to take advantage of special hardware features such as instruction cache cpu pipelines and vector arrays for example one of ibms fortran compilers h extended iup had a level of optimization which reordered the machine code instructions to keep multiple internal arithmetic units busy simultaneously another example is cfd a special variant of fortran designed specifically for the illiac iv supercomputer running at nasas ames research center ibm research labs also developed an extended fortranbased language called vectran for processing vectors and matrices objectoriented fortran was an objectoriented extension of fortran in which data items can be grouped into objects which can be instantiated and executed in parallel it was available for sun iris ipsc and ncube but is no longer supported such machinespecific extensions have either disappeared over time or have had elements incorporated into the main standards the major remaining extension is openmp which is a crossplatform extension for shared memory programming one new extension coarray fortran is intended to support parallel programming for transit for the ibm 650 for transit was the name of a reduced version of the ibm 704 fortran language which was implemented for the ibm 650 using a translator program developed at carnegie in the late 1950s the following comment appears in the ibm reference manual for transit automatic coding system c284038 copyright 1957 1959 by ibm the fortran system was designed for a more complex machine than the 650 and consequently some of the 32 statements found in the fortran programmers reference manual are not acceptable to the for transit system in addition certain restrictions to the fortran language have been added however none of these restrictions make a source program written for for transit incompatible with the fortran system for the 704 the permissible statements were arithmetic assignment statements eg a b go to n go to n1 n2 nm i if a n1 n2 n3 pause stop do n i m1 m2 continue end read n list punch n list dimension v v v equivalence abc dc up to ten subroutines could be used in one program for transit statements were limited to columns 7 through 56 only punched cards were used for input and output on the ibm 650 three passes were required to translate source code to the it language then to compile the it statements into soap assembly language and finally to produce the object program which could then be loaded into the machine to run the program using punched cards for data input and outputting results onto punched cards two versions existed for the 650s with a 2000 word memory drum for transit i s and for transit ii the latter for machines equipped with indexing registers and automatic floating point decimal biquinary arithmetic appendix a of the manual included wiring diagrams for the ibm 533 card readerpunch control panel fortranbased languages prior to fortran 77 a number of preprocessors were commonly used to provide a friendlier language with the advantage that the preprocessed code could be compiled on any machine with a standard fortran compiler these preprocessors would typically support structured programming variable names longer than six characters additional data types conditional compilation and even macro capabilities popular preprocessors included flecs iftran mortran sftran sfortran ratfor and ratfiv ratfor and ratfiv for example implemented a clike language outputting preprocessed code in standard fortran 66 despite advances in the fortran language preprocessors continue to be used for conditional compilation and macro substitution one of the earliest versions of fortran introduced in the 60s was popularly used in colleges and universities developed supported and distributed by the university of waterloo watfor was based largely on fortran iv a student using watfor could submit their batch fortran job and if there were no syntax errors the program would move straight to execution this simplification allowed students to concentrate on their programs syntax and semantics or execution logic flow rather than dealing with submission job control language jcl the compilelinkeditexecution successive processes or other complexities of the mainframeminicomputer environment a down side to this simplified environment was that watfor was not a good choice for programmers needing the expanded abilities of their host processors eg watfor typically had very limited access to io devices watfor was succeeded by watfiv and its later versions program s0 i1n ss1 stop i ss stop line programming lrltran was developed at the lawrence radiation laboratory to provide support for vector arithmetic and dynamic storage among other extensions to support systems programming the distribution included the ltss operating system the fortran95 standard includes an optional part 3 which defines an optional conditional compilation capability this capability is often referred to as coco many fortran compilers have integrated subsets of the c preprocessor into their systems simscript is an application specific fortran preprocessor for modeling and simulating large discrete systems the f programming language was designed to be a clean subset of fortran 95 that attempted to remove the redundant unstructured and deprecated features of fortran such as the equivalence statement f retains the array features added in fortran 90 and removes control statements that were made obsolete by structured programming constructs added to both fortran 77 and fortran 90 f is described by its creators as a compiled structured array programming language especially well suited to education and scientific computing lahey and fujitsu teamed up to create fortran for the microsoft net framework code examples further information wikibooksfortranfortran examples the following program illustrates dynamic memory allocation and arraybased operations two features introduced with fortran 90 particularly noteworthy is the absence of do loops and ifthen statements in manipulating the array mathematical operations are applied to the array as a whole also apparent is the use of descriptive variable names and general code formatting that conform with contemporary programming style this example computes an average over data entered interactively program average read in some numbers and take the average as written if there are no data points an average of zero is returned while this may not be desired behavior it keeps this example simple implicit none real dimension allocatable points integer numberofpoints real averagepoints0 positiveaverage0 negativeaverage0 write input number of points to average read numberofpoints allocate pointsnumberofpoints write enter the points to average read points take the average by summing points and dividing by numberofpoints if numberofpoints 0 averagepoints sumpoints numberofpoints now form average over positive and negative points only if countpoints 0 0 then positiveaverage sumpoints points 0 countpoints 0 end if if countpoints 0 0 then negativeaverage sumpoints points 0 countpoints 0 end if deallocate points print result to terminal write ag124 average averagepoints write ag124 average of positive points positiveaverage write ag124 average of negative points negativeaverage end program average humor during the same fortran standards committee meeting at which the name fortran 77 was chosen a satirical technical proposal was incorporated into the official distribution bearing the title letter o considered harmful this proposal purported to address the confusion that sometimes arises between the letter o and the numeral zero by eliminating the letter from allowable variable names however the method proposed was to eliminate the letter from the character set entirely thereby retaining 48 as the number of lexical characters which the colon had increased to 49 this was considered beneficial in that it would promote structured programming by making it impossible to use the notorious go to statement as before troublesome format statements would also be eliminated it was noted that this might invalidate some existing programs but that most of these probably were nonconforming anyway when assumedlength arrays were being added there was a dispute as to the appropriate character to separate upper and lower bounds in a comment examining these arguments dr walt brainerd penned an article entitled astronomy vs gastroenterology because some proponents had suggested using the star or asterisk while others favored the colon in fortran 77 variable names beginning with the letters in had a default type of integer while variables starting with any other letters defaulted to real although programmers could override the defaults with an explicit declaration this led to the joke in fortran god is real unless declared integer computer programming portal f2c formac list of fortran compilers list of fortran numerical libraries list of programming languages matrix representation rowmajor order articles allen fe september 1981 a history of language processor technology in ibm ibm journal of research and development ibm 25 5 doi101147rd2550535 backus j w h stern i ziller r a hughes r nutt r j beeber s best r goldberg l m haibt h l herrick r a nelson d sayre p b sheridan ziller i hughes r a nutt r beeber r j best s goldberg r haibt l m herrick h l nelson r a sayre d sheridan p b 1957 the fortran automatic coding system western joint computer conference techniques for reliability los angeles california institute of radio engineers american institute of electrical engineers acm 188198 doi10114514555671455599cs1 maint multiple names authors list link chivers ian d sleightholme jane 2013 compiler support for the fortran 2003 2008 standards acm sigplan fortran forum acm 28 1 2628 doi10114515207521520755 issn10617264 archived from the original on 20080516 pigott diarmuid 2006 fortran backus et al highlevel compiler computer language the encyclopedia of computer languages murdoch university archived from the original on 8 october 2009 retrieved 5 may 2010 roberts mark l griffiths peter d 1985 design considerations for ibm personal computer professional fortran an optimizing compiler pdf ibm systems journal ibm 24 1 4960 doi101147sj2410049 core language standards ansi x391966 usa standard fortran pdf american national standards institute informally known as fortran 66 ansi x391978 american national standard programming language fortran american national standards institute also known as iso 15391980 informally known as fortran 77 ansi x31981992 r1997 isoiec 15391991 american national standard programming language fortran extended american national standards institute isoiec archived from the original on 1 may 2002 informally known as fortran 90 isoiec 153911997 information technology programming languages fortran part 1 base language pdf archived from the original pdf on 18 august 2011 retrieved 13 december 2007 informally known as fortran 95 there are a further two parts to this standard part 1 has been formally adopted by ansi isoiec 153912004 information technology programming languages fortran part 1 base language pdf informally known as fortran 2003 isoiec 153912010 final draft international standard information technology programming languages fortran part 1 base language pdf informally known as fortran 2008 related standards kneis wilfried october 1981 industrial realtime fortran acm sigplan notices acm press 16 7 4560 doi101145947864947868 issn03621340 iso 865111988 information processing systems computer graphics graphical kernel system gks language bindings part 1 fortran geneva switzerland iso 1988 other reference material ecma standard on fortran pdf european computer manufacturers association april 1965 retrieved 20141117 fortran 77 40 reference manual pdf sun microsystems inc 1995 retrieved 20141117 fortran coding form pdf ibm archived from the original pdf on 8 june 2015 retrieved 17 november 2014 ibm system360 and system370 fortran iv language pdf international business machines may 1974 retrieved 20141117 goerz michael 2014 modern fortran reference card pdf retrieved 20141214 textbooks adams jeanne c brainerd walter s hendrickson richard a maine richard e martin jeanne t smith brian t 2009 the fortran 2003 handbook 1st ed springer isbn9781846283789 akin ed 2003 object oriented programming via fortran 9095 1st ed cambridge university press isbn0521524083 chapman stephen j 2007 fortran 952003 for scientists and engineers 3rd ed mcgrawhill isbn9780073191577 chivers ian sleightholme jane 2015 introduction to programming with fortran 3rd ed springer isbn9783319177007 etter d m 1990 structured fortran 77 for engineers and scientists 3rd ed the benjamincummings publishing company inc isbn0805300511 ellis t m r phillips ivor r lahey thomas m 1994 fortran 90 programming 1st ed addison wesley isbn0201544466 kupferschmid michael 2002 classical fortran programming for engineering and scientific applications marcel dekker crc press isbn0824708024 mccracken daniel d 1961 a guide to fortran programming new york wiley lccn61016618 metcalf michael john reid malcolm cohen 2011 modern fortran explained oxford university press isbn0199601429 nyhoff larry sanford leestma 1995 fortran 77 for engineers and scientists with an introduction to fortran 90 4th ed prentice hall isbn013363003x page clive g 1988 professional programmers guide to fortran77 7 june 2005 ed london pitman isbn0273028561 retrieved 4 may 2010 press william h 1996 numerical recipes in fortran 90 the art of parallel scientific computing cambridge uk cambridge university press isbn0521574390 sleighthome jane chivers ian david 1990 interactive fortran 77 a handson approach computers and their applications 2nd ed chichester e horwood isbn0134667646 archived from the original on 12 march 2014 retrieved 12 march 2014 wikibooks has a book on the topic of fortran wikiquote has quotations related to fortran isoiec jtc1sc22wg5 the official home of fortran standards fortran standards documents gfortran standards history of fortran and fortran ii computer history museum valmer norrod et ala selfstudy course in fortran programing volume i textbook computer science corporation el segundo california april1970 nasan7025287 valmer norrod sheldom blecher and martha horton a selfstudy course in fortran programing volume ii workbook nasa cr1478 volii april1970 nasan7025288 vteibmhistory history of ibm mergers and acquisitions think motto operating systems products cell microprocessor mainframe personal computer ibm power systems information management software lotus software rational software spss ilog tivoli software service automation manager websphere alphaworks criminal reduction utilising statistical history mashup center purequery redbooks flashsystem fortran connections business entities center for the business of government cloud computing global services international subsidiaries jstart kenexa research the weather company weather underground watson health facilities towers 1250 renlvesque montreal qc one atlantic center atlanta ga software labs rome software lab toronto software lab ibm buildings 330 north wabash chicago il johannesburg seattle research labs africa almaden austin laboratory australia brazil china laboratory haifa laboratory india laboratory ireland thomas j watson center new york tokyo zurich laboratory facilities hakozaki facility yamato facility cambridge scientific center ibm hursley canada head office building ibm rochester somers office complex initiatives academy of technology centers for advanced studies cascon deep thunder ibm fellow pulse conference the great mind challenge developerworks develothon linux technology center ibm virtual universe community smarter planet world community grid inventions automated teller machine electronic keypunch hard disk drive floppy disk dram relational model selectric typewriter financial swaps universal product code magnetic stripe card sabre airline reservation system scanning tunneling microscope terminology globally integrated enterprise commercial processing workload consumability ebusiness ceos thomas j watson 19141956 thomas watson jr 19561971 t vincent learson 19711973 frank t cary 19731981 john r opel 19811985 john fellows akers 19851993 louis v gerstner jr 19932002 samuel j palmisano 20022011 ginni rometty 2012present board of directors alain belda william r brody kenneth chenault michael l eskew david farr shirley ann jackson andrew n liveris james mcnerney james w owens samuel j palmisano virginia m rometty joan e spero sidney taurel lorenzo zambrano other a boy and his atom common public licenseibm public license customer engineer deep blue deep thought dynamic infrastructure guide international ibm and the holocaust ibm international chess tournament lucifer cipher mathematica ibm plex share computing scicomp watson quantum experience vteprogramming languages comparison timeline history apl assembly basic c c c cobol fortran go groovy haskell java javascript js kotlin lisp lua objectivec pascal perl php python ruby rust shell smalltalk swift visual basic net vbnet more category lists alphabetical categorical generational nonenglishbased authority control bne xx531008 bnf cb11931442r data gnd 40179849 lccn sh85050987 