Modern Fortran explained /

Metcalf, Michael, 1931-

Modern Fortran explained / Michael Metcalf, John Reid, and Malcolm Cohen. - Oxford ; New York : Oxford University Press, 2011. - xx, 488 p. : ill. ; 24 cm. - Numerical mathematics and scientific computation . - Numerical mathematics and scientific computation. .

Previous ed.: published as Fortran 95/2003 explained. 2004. Includes index.

Whence Fortran? -- Introduction -- Fortran's early history -- The drive for the Fortran 90 standard -- Language evolution -- Fortran 95 -- Extensions to Fortran 95 -- Fortran 2003 -- Fortran 2008 -- Conformance -- Language elements -- Introduction -- Fortran character set -- Tokens -- Source form -- Concept of type -- Literal constants of intrinsic type -- Integer literal constants -- Real literal constants -- Complex literal constants -- Character literal constants -- Logical literal constants -- Names -- Scalar variables of intrinsic type -- Derived data types -- Arrays of intrinsic type -- Character substrings -- Objects and subobjects -- Pointers -- Summary -- Expressions and assignments -- Introduction -- Scalar numeric expressions -- Defined and undefined variables Machine generated contents note: 1. 1.1. 1.2. 1.3. 1.4. 1.5. 1.6. 1.7. 1.8. 1.9. 2. 2.1. 2.2. 2.3. 2.4. 2.5. 2.6. 2.6.1. 2.6.2. 2.6.3. 2.6.4. 2.6.5. 2.7. 2.8. 2.9. 2.10. 2.11. 2.12. 2.13. 2.14. 3. 3.1. 3.2. 3.3. Scalar numeric assignment -- Scalar relational operators -- Scalar logical expressions and assignments -- Scalar character expressions and assignments -- Structure constructors and scalar defined operators -- Scalar defined assignments -- Array expressions -- Array assignment -- Pointers in expressions and assignments -- The nullify statement -- Summary -- Control constructs -- Introduction -- The if construct and statement -- The case construct -- The do construct -- The go to statement -- Summary -- Program units and procedures -- Introduction -- Main program -- The stop statement -- External subprograms -- Modules -- Internal subprograms -- Arguments of procedures -- Pointer arguments -- Restrictions on actual arguments -- Arguments with the target attribute -- The return statement -- Argument intent -- Functions -- Prohibited side-effects -- Explicit and implicit interfaces 3.4. 3.5. 3.6. 3.7. 3.8. 3.9. 3.10. 3.11. 3.12. 3.13. 3.14. 4. 4.1. 4.2. 4.3. 4.4. 4.5. 4.6. 5. 5.1. 5.2. 5.3. 5.4. 5.5. 5.6. 5.7. 5.7.1. 5.7.2. 5.7.3. 5.8. 5.9. 5.10. 5.10.1. 5.11. Procedures as arguments -- Keyword and optional arguments -- Scope of labels -- Scope of names -- Direct recursion -- Indirect recursion -- Overloading and generic interfaces -- Assumed character length -- The subroutine and function statements -- Summary -- Array features -- Introduction -- Zero-sized arrays -- Assumed-shape arrays -- Automatic objects -- Allocation of data -- The allocatable attribute -- The allocate statement -- The deallocate statement -- Allocatable dummy arguments -- Allocatable functions -- Allocatable components -- Allocatable arrays vs. pointers -- Elemental operations and assignments -- Array-valued functions -- The where statement and construct -- The forall statement and construct -- Pure procedures -- Elemental procedures -- Array elements -- Array subobjects -- Arrays of pointers -- Pointers as aliases 5.12. 5.13. 5.14. 5.15. 5.16. 5.17. 5.18. 5.19. 5.20. 5.21. 6. 6.1. 6.2. 6.3. 6.4. 6.5. 6.5.1. 6.5.2. 6.5.3. 6.5.4. 6.5.5. 6.5.6. 6.5.7. 6.6. 6.7. 6.8. 6.9. 6.10. 6.11. 6.12. 6.13. 6.14. 6.15. Array constructors -- Mask arrays -- Summary -- Specification statements -- Introduction -- Implicit typing -- Declaring entities of differing shapes -- Named constants and constant expressions -- Initial values for variables -- Initialization in type declaration statements -- The data statement -- Pointer initialization and the function null -- Default initialization of components -- The public and private attributes -- The pointer, target, and allocatable statements -- The intent and optional statements -- The save attribute -- The use statement -- Derived-type definitions -- The type declaration statement -- Type and type parameter specification -- Specification expressions -- Specification functions -- The namelist statement -- Summary -- Intrinsic procedures -- Introduction -- Keyword calls -- Categories of intrinsic procedures -- The intrinsic statement 6.16. 6.17. 6.18. 7. 7.1. 7.2. 7.3. 7.4. 7.5. 7.5.1. 7.5.2. 7.5.3. 7.5.4. 7.6. 7.7. 7.8. 7.9. 7.10. 7.11. 7.12. 7.13. 7.14. 7.14.1. 7.15. 7.16. 8. 8.1. 8.1.1. 8.1.2. 8.1.3. Argument intents -- Inquiry functions for any type -- Elemental numeric functions -- Elemental functions that may convert -- Elemental functions that do not convert -- Elemental mathematical functions -- Elemental character and logical functions -- Character-integer conversions -- Lexical comparison functions -- String-handling elemental functions -- Logical conversion -- Non-elemental string-handling functions -- String-handling inquiry function -- String-handling transformational functions -- Numeric inquiry and manipulation functions -- Models for integer and real data -- Numeric inquiry functions -- Elemental functions to manipulate reals -- Transformational functions for kind values -- Bit manipulation procedures -- Inquiry function -- Elemental functions -- Elemental subroutine -- Transfer function -- Vector and matrix multiplication functions -- Transformational functions that reduce arrays 8.1.4. 8.2. 8.3. 8.3.1. 8.3.2. 8.4. 8.5. 8.5.1. 8.5.2. 8.5.3. 8.5.4. 8.6. 8.6.1. 8.6.2. 8.7. 8.7.1. 8.7.2. 8.7.3. 8.7.4. 8.8. 8.8.1. 8.8.2. 8.8.3. 8.9. 8.10. 8.11. Single argument case -- Optional argument dim -- Optional argument mask -- Array inquiry functions -- Allocation status -- Bounds, shape, and size -- Array construction and manipulation functions -- The merge elemental function -- Packing and unpacking arrays -- Reshaping an array -- Transformational function for replication -- Array shifting functions -- Matrix transpose -- Transformational functions for geometric location -- Transformational function for pointer disassociation -- Non-elemental intrinsic subroutines -- Real-time clock -- CPU time -- Random numbers -- Summary -- Data transfer -- Introduction -- Number conversion -- I/O lists -- Format definition -- Unit numbers -- Internal files -- Formatted input -- Formatted output -- List-directed I/O -- Namelist I/O -- Non-advancing I/O -- Edit descriptors 8.11.1. 8.11.2. 8.11.3. 8.12. 8.12.1. 8.12.2. 8.13. 8.13.1. 8.13.2. 8.13.3. 8.13.4. 8.13.5. 8.13.6. 8.14. 8.15. 8.16. 8.16.1. 8.16.2. 8.16.3. 8.17. 9. 9.1. 9.2. 9.3. 9.4. 9.5. 9.6. 9.7. 9.8. 9.9. 9.10. 9.11. 9.12. Repeat counts -- Data edit descriptors -- Character string edit descriptor -- Control edit descriptors -- Unformatted I/O -- Direct-access files -- Execution of a data transfer statement -- Summary -- Operations on external files -- Introduction -- Positioning statements for sequential files -- The backspace statement -- The rewind statement -- The endfile statement -- Data transfer statements -- The open statement -- The close statement -- The inquire statement -- Summary -- Floating-point exception handling -- Introduction -- The IEEE standard -- Access to the features -- The Fortran flags -- Halting -- The rounding mode -- The underflow mode (Fortran 2003 only) -- The module ieee%5Fexceptions -- Derived types -- Inquiry functions for IEEE exceptions -- Subroutines for the flags and halting modes -- Subroutines for the whole of the floating-point status 9.12.1. 9.12.2. 9.12.3. 9.12.4. 9.13. 9.14. 9.15. 9.16. 10. 10.1. 10.2. 10.2.1. 10.2.2. 10.2.3. 10.2.4. 10.3. 10.4. 10.5. 10.6. 11. 11.1. 11.2. 11.3. 11.4. 11.5. 11.6. 11.7. 11.8. 11.8.1. 11.8.2. 11.8.3. 11.8.4. The module ieee%5Farithmetic -- Derived types -- Inquiry functions for IEEE arithmetic -- Elemental functions -- Non-elemental subroutines -- Transformational function for kind value -- Examples -- Dot product -- Calling alternative procedures -- Calling alternative in-line code -- Reliable hypotenuse function -- Access to IEEE arithmetic values -- Interoperability with C -- Introduction -- Interoperability of intrinsic types -- Interoperability with C pointer types -- Interoperability of derived types -- Interoperability of variables -- The value attribute -- Interoperability of procedures -- Interoperability of global data -- Invoking a C function from Fortran -- Invoking Fortran from C -- Enumerations -- Type parameters and procedure pointers -- Introduction -- Deferred type parameters -- Type parameter enquiry -- Parameterized derived types -- Defining a parameterized derived type 11.9. 11.9.1. 11.9.2. 11.9.3. 11.9.4. 11.9.5. 11.10. 11.10.1. 11.10.2. 11.10.3. 11.10.4. 11.10.5. 12. 12.1. 12.2. 12.3. 12.4. 12.5. 12.6. 12.7. 12.8. 12.9. 12.10. 12.11. 13. 13.1. 13.2. 13.3. 13.4. 13.4.1. Assumed and deferred type parameters -- Default type parameter values -- Derived type parameter enquiry -- Abstract interfaces -- Procedure pointers -- Procedure pointer variables -- Procedure pointer components -- The pass attribute -- Object-oriented programming -- Introduction -- Type extension -- Type extension and type parameters -- Polymorphic entities -- Establishing the dynamic type -- Limitations on the use of a polymorphic variable -- Polymorphic arrays and scalars -- Unlimited polymorphic entities -- Polymorphic entities and generic resolution 13.4.2. 13.4.3. 13.4.4. 13.5. 13.6. 13.6.1. 13.6.2. 13.6.3. 14. 14.1. 14.2. 14.2.1. 14.3. 14.3.1. 14.3.2. 14.3.3. 14.3.4. 14.3.5. The associate construct -- The select type construct -- Type-bound procedures -- Specific type-bound procedures -- Generic type-bound procedures -- Type extension and type-bound procedures -- Deferred bindings and abstract types -- Finalization -- Type extension and final subroutines -- Procedure encapsulation example -- Type inquiry functions -- Establishing and moving data -- Introduction -- Mixed component accessibility -- Structure constructors -- The allocate statement -- Typed allocation and deferred type parameters -- Polymorphic variables and typed allocation -- Sourced allocation -- Allocatable entities -- Allocatable scalars -- Assignment to an allocatable array -- Transferring an allocation -- Pointer assignment -- More control of access from a module 14.4. 14.5. 14.6. 14.6.1. 14.6.2. 14.6.3. 14.7. 14.8. 14.8.1. 14.9. 14.10. 15. 15.1. 15.2. 15.3. 15.4. 15.4.1. 15.4.2. 15.4.3. 15.5. 15.5.1. 15.5.2. 15.5.3. 15.6. 15.7. Renaming operators on the use statement -- Array constructor syntax -- Specification and constant expressions -- Miscellaneous enhancements -- Introduction -- Pointer intent -- The volatile attribute -- Volatile semantics -- Volatile scoping -- Volatile arguments -- The import statement -- Intrinsic modules -- Access to the computing environment -- Environment variables -- Information about the program invocation -- Support for internationalization -- Character sets -- ASCII character set -- ISO 10646 character set -- UTF-8 files -- Decimal comma for input/output -- Lengths of names and statements -- Binary, octal, and hexadecimal constants -- Other changes to intrinsic procedures -- Error message retrieval -- Enhanced complex constants -- Interface block extensions -- Public entities of private type -- Input/output enhancements 15.8. 15.9. 15.10. 16. 16.1. 16.2. 16.3. 16.3.1. 16.3.2. 16.3.3. 16.4. 16.5. 16.6. 16.6.1. 16.6.2. 16.7. 16.7.1. 16.7.2. 16.7.3. 16.7.4. 16.7.5. 16.8. 16.9. 16.10. 16.11. 16.12. 16.13. 16.14. 17. Introduction -- Non-default derived-type input/output -- Asynchronous input/output -- The asynchronous attribute -- Input and output of IEEE exceptional values -- Stream access input/output -- Recursive input/output -- The flush statement -- Comma after a P edit descriptor -- The iomsg= specifier -- The round= specifier -- The sign= specifier -- Kind type parameters of integer and logical specifiers -- More specifiers in read and write statements -- Intrinsic functions for I/O status testing -- Some inquire statement enhancements -- Namelist enhancements -- Enhanced module facilities -- Introduction -- Submodules -- Separate module procedures -- Submodules of submodules -- Submodule entities -- Submodules and use association -- The advantages of submodules -- Coarrays -- Introduction -- Referencing images -- The properties of coarrays 17.1. 17.2. 17.3. 17.4. 17.5. 17.6. 17.7. 17.8. 17.9. 17.10. 17.11. 17.12. 17.13. 17.14. 17.15. 17.16. 17.17. 18. 18.1. 18.2. 18.2.1. 18.2.2. 18.2.3. 18.2.4. 18.3. 19. 19.1. 19.2. 19.3. Accessing coarrays -- The sync all statement -- Coarrays in procedures -- Allocatable coarrays -- Coarrays with allocatable or pointer components -- Data components -- Procedure pointer components -- Coarray components -- References to polymorphic subobjects -- Volatile and asynchronous attributes -- Interoperability -- Synchronization -- Execution segments -- The sync images statement -- The lock and unlock statements -- Critical sections -- The sync memory statement and atomic subroutines -- The stat= and errmsg= specifiers in synchronization statements -- The image control statements -- Program termination -- Input/Output -- Intrinsic procedures -- Inquiry functions -- Transformational functions -- Other Fortran 2008 enhancements -- Trivial syntactic conveniences -- Implied-shape arrays -- Implied-do loops in data statements 19.4. 19.5. 19.6. 19.7. 19.8. 19.8.1. 19.8.2. 19.9. 19.10. 19.11. 19.12. 19.13. 19.13.1. 19.13.2. 19.13.3. 19.13.4. 19.13.5. 19.13.6. 19.13.7. 19.14. 19.15. 19.16. 19.16.1. 19.16.2. 20. 20.1. 20.1.1. 20.1.2. Type-bound procedures -- Structure constructors -- Semicolons -- The stop statement -- Exit from nearly any construct -- Limitation changes -- 64-bit integer support -- Maximum array rank -- Data expressiveness -- Allocatable components of recursive type -- Initial pointer association -- Performance-oriented features -- The do concurrent construct -- The contiguous attribute -- Simply contiguous array designators -- Computational expressiveness -- Accessing parts of complex variables -- Pointer functions denoting variables -- The block construct -- Impure elemental procedures -- Internal procedures as actual arguments -- Specifying the kind of a forall index variable -- Generic resolution -- Data usage and computation -- Enhancements to the allocate statement -- Automatic reallocation -- Elemental subprogram restrictions -- Input/output 20.1.3. 20.1.4. 20.1.5. 20.1.6. 20.1.7. 20.2. 20.2.1. 20.2.2. 20.3. 20.3.1. 20.3.2. 20.4. 20.4.1. 20.4.2. 20.4.3. 20.5. 20.5.1. 20.5.2. 20.5.3. 20.5.4. 20.5.5. 20.5.6. 20.5.7. 20.6. 20.6.1. 20.6.2. 20.6.3. 20.7. Recursive input/output -- The newunit= specifier -- Writing comma-separated values -- Intrinsic procedures -- Mathemetical intrinsic functions -- Changes to trigonometric functions -- New hyperbolic trigonometic functions -- New special mathematical functions -- Euclidean norms -- Bit manipulation -- Bitwise (unsigned) comparison -- Double-width shifting -- Bitwise reductions -- Counting bits -- Producing bitmasks -- Merging bits -- Additional shift operations -- Miscellaneous intrinsic procedures -- Procedures supporting coarrays -- Executing another program -- Character comparison -- Array searching -- Logical parity -- Decimal arithmetic support -- Size of an object in memory -- Additions to the iso%5Ffortran%5Fenv module -- Compilation information -- Names for common kinds -- Kind arrays 20.7.1. 20.7.2. 20.7.3. 20.8. 20.9. 20.9.1. 20.9.2. 20.9.3. 20.9.4. 20.10. 20.10.1. 20.10.2. 20.10.3. 20.10.4. 20.10.5. 20.10.6. 20.10.7. 20.11. 20.11.1. 20.11.2. 20.11.3. 20.11.4. 20.11.5. 20.11.6. 20.11.7. 20.12. 20.12.1. 20.12.2. 20.12.3. Coarray support facilities -- Changes to other standard intrinsic modules -- The iso%5Fc%5Fbinding module -- The ieee%5Farithmetic module -- Programs and procedures -- Saved module entities -- Automatic pointer targetting -- Denoting absent arguments -- Intrinsic procedures -- Deprecated features -- Introduction -- Storage association -- Storage units -- The equivalence statement -- The common block -- The block data program unit -- Coarrays and storage association -- Shape and character length disagreement -- The include line -- Other forms of loop control -- The labelled do construct -- The do while -- Double precision real -- The dimension, codimension, and parameter statements -- Specific names of intrinsic procedures -- Non-default mapping for implicit typing -- Fortran 2008 deprecated features -- The sync memory statement and atomic subroutines 20.12.4. 20.13. 20.13.1. 20.13.2. 20.14. 20.14.1. 20.14.2. 20.14.3. A. B. B.1. B.2. B.2.1. B.2.2. B.2.3. B.2.4. B.2.5. B.3. B.4. B.5. B.5.1. B.5.2. B.6. B.7. B.8. B.9. B.10. B.10.1. Components of type c%5Fptr or c%5Ffunptr -- Type declarations -- Redundant contains statement -- The end statement -- Referencing atan2 by the name atan -- Obsolescent features -- Obsolescent in Fortran 95 -- Fixed source form -- Computed go to -- Character length specification character -- Data statements among executables -- Statement functions -- Assumed character length of function results -- Arithmetic if statement -- Shared do-loop termination -- Alternate return -- Feature obsolescent in Fortran 2008: Entry statement -- Feature deleted in Fortran 2003: Carriage control -- Features deleted in Fortran 95 -- Avoiding compilation cascades -- Object-oriented list example -- Fortran terms -- Solutions to exercises. B.10.2. B.10.3. B.10.4. B.10.5. B.10.6. C. C.1. C.1.1. C.1.2. C.1.3. C.1.4. C.1.5. C.1.6. C.1.7. C.1.8. C.1.9. C.2. C.3. C.4. D. E. F. G.

9780199601424 (pbk.) 0199601429 (pbk.) 9780199601417 0199601410

2012360954

GBB0D3276 bnb GBB0D3276 dnb


FORTRAN (Computer program language)

QA76.73.F235 / M48 2011

005.342