Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Fortran
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Fortran 90=== The much-delayed successor to FORTRAN 77, informally known as ''Fortran 90'' (and prior to that, ''Fortran 8X''), was finally released as ISO/IEC standard 1539:1991 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: * [[free-form language|Free-form source input]] removed the need to skip the first six character positions before entering statements. * 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 <syntaxhighlight lang="fortran" inline>X(1:N)=R(1:N)*COS(A(1:N))</syntaxhighlight> ** {{code|WHERE}} statement for selective array assignment ** array-valued constants and expressions, ** user-defined array-valued functions and array constructors. * [[recursion (computer science)|{{code|RECURSIVE}}]] procedures * [[Modular programming|Modules]], to group related [[Subroutine|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 argument-passing mechanism, allowing [[type signature|interfaces]] to be checked at compile time * User-written 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 {{code|ALLOCATABLE}} attribute and the {{code|ALLOCATE}} and {{code|DEALLOCATE}} statements * [[Pointer (computer programming)|{{code|POINTER}}]] attribute, pointer assignment, and {{code|NULLIFY}} statement to facilitate the creation and manipulation of dynamic [[data structure]]s * Structured looping constructs, with an {{code|END DO}} statement for loop termination, and {{code|EXIT}} and {{code|CYCLE}} statements for terminating normal {{code|DO}} loop iterations in an orderly way * {{code|SELECT CASE}}, {{code|CASE}}, . . . {{code|CASE DEFAULT}}, {{code|END SELECT}} construct for [[Switch statement|multi-way selection]] * Portable specification of numerical precision under the user's control * New and enhanced intrinsic procedures. ====Obsolescence and deletions==== Unlike the prior revision, Fortran 90 removed no features.<ref>ANSI X3.198-1992 (R2002) (Fortran 90), Appendix B.1.</ref> Any standard-conforming FORTRAN 77 program was also standard-conforming under Fortran 90, and either standard should have been usable to define its behavior. A small set of features were identified as "obsolescent" and were expected to be removed in a future standard. All of the functionalities of these early-version features can be performed by newer Fortran features. Some are kept to simplify porting of old programs but many were deleted in Fortran 95. {| class="wikitable sortable" |+ Obsolescence and deletions |- ! Obsolescent feature ! Current status |- | [[Arithmetic IF]]-statement | Obsolescent in F90, deleted in F2018 |- | Non-integer DO parameters or control variables | Obsolescent in F90, deleted in F95 |- | Shared DO-loop termination or termination with a statement other than END DO or CONTINUE | Obsolescent in F90, deleted in F2018 |- | Branching to END IF from outside a block | Obsolescent in F90, deleted in F95 |- | PAUSE statement | Obsolescent in F90, deleted in F95 |- | ASSIGN statement and assigned GO TO statement | Obsolescent in F90, deleted in F95 |- | Assigned statement numbers and FORMAT specifiers | Obsolescent in F90, deleted in F95 |- | H edit descriptor | Obsolescent in F90, deleted in F95 |- | Vertical format control | Deleted in F2003 |- | Alternate return | Obsolescent in F90 |- | Computed GO TO statement | Obsolescent in F90 |- | Statement functions | Obsolescent in F90 |- | DATA statements among executable statements | Obsolescent in F90 |- | Assumed length character functions | Obsolescent in F90 |- | Fixed form source code | Obsolescent in F90 |- | CHARACTER* form of CHARACTER declaration | Obsolescent in F90 |- | ENTRY statements | Obsolescent in F2008 |- | Label form of DO statement | Obsolescent in F2018 |- | COMMON and EQUIVALENCE statements, and the BLOCK DATA program unit | Obsolescent in F2018 |- | Specific names for intrinsic function | Obsolescent in F2018 |- | FORALL construct and statement | Obsolescent in F2018 |} ===="Hello, World!" example==== <syntaxhighlight lang="fortran"> program helloworld print *, "Hello, World!" end program helloworld </syntaxhighlight>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Fortran
(section)
Add topic