Fortran 95/2003 Explained

by ; ;
Edition: 3rd
Format: Hardcover
Pub. Date: 2004-08-26
Publisher(s): Oxford University Press
List Price: $97.06

Rent Textbook

Select for Price
There was a problem. Please try again later.

New Textbook

We're Sorry
Sold Out

Used Textbook

We're Sorry
Sold Out

eTextbook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

Fortran remains one of the principal languages used in scientific, numerical and engineering programming and a series of revisions to the standard versions of the language have progressively enhanced its power. The latest standard-Fortran 2003-greatly extends the power of the language, by introducing object-oriented concepts, interoperability with C, better integration with operating systems and many other enhancements. This text details all these new features. Fortran 95/2003 Explained , significantly expands on the second edition of Fortran 90/95 Explained (also publised by Oxford University Press): the opening chapters contain a complete description of the Fortran 95 language and are followed by descriptions of three formally approved extensions; six completely new chapters describe in detail the features that are new in Fortran 2003, but the distinction between the various language levels is kept clear throughout. Authored by the leading experts in the development of the language, this is the only complete and authoritative description of the two languages (Fortran 95 and Fortran 2003). Containing numerous examples, exercises and solutions, and an extensive index, it is highly suitable as both a student textbook and practitioner reference.

Author Biography


Michael Metcalf worked for many years at CERN, Geneva. He is the author of a range of publications, including Fortran 90/95 Explained (with John Reid) and Effective FORTRAN 77 (Oxford University Press), and FORTRAN Optimization (Academic Press). He is the editor of ACM Fortran Forum. John Reid is well known as a numerical analyst and is a co-author of Direct Methods for Sparse Matrices (OUP). He is the Convener of the ISO Fortran Committee and has played a leading role in the development of many of the features of Fortran 95 and 2003.
Malcolm Cohen is a mathematician and the leading compiler writer at NAG in Oxford. He has participated actively in the development of Fortran standards and was a major deisgner of Fortran 2003's object-oriented features.

Table of Contents

Whence Fortran?
1(8)
Introduction
1(1)
Fortran's early history
2(1)
The drive for the Fortran 90 standard
3(1)
Language evolution
4(1)
Fortran 95
4(1)
Extensions to Fortran 95
5(1)
Fortran 2003
6(1)
Conformance
7(2)
Language elements
9(24)
Introduction
9(1)
Fortran character set
9(1)
Tokens
10(1)
Source form
11(2)
Concept of type
13(1)
Literal constants of intrinsic type
13(6)
Integer literal constants
14(1)
Real literal constants
15(1)
Complex literal constants
16(1)
Character literal constants
17(2)
Logical literal constants
19(1)
Names
19(1)
Scalar variables of intrinsic type
20(1)
Derived data types
21(1)
Arrays of intrinsic type
22(3)
Character substrings
25(1)
Objects and subobjects
26(1)
Pointers
27(1)
Summary
28(1)
Exercises
29(4)
Expressions and assignments
33(20)
Introduction
33(1)
Scalar numeric expressions
34(3)
Defined and undefined variables
37(1)
Scalar numeric assignment
38(1)
Scalar relational operators
38(1)
Scalar logical expressions and assignments
39(2)
Scalar character expressions and assignments
41(1)
Structure constructors and scalar defined operators
42(3)
Scalar defined assignments
45(1)
Array expressions
46(2)
Array assignment
48(1)
Pointers in expressions and assignments
48(3)
Summary
51(1)
Exercises
51(2)
Control constructs
53(14)
Introduction
53(1)
The go to statement
53(1)
The if statement and construct
54(2)
The case construct
56(2)
The do construct
58(5)
Summary
63(2)
Exercises
65(2)
Program units and procedures
67(32)
Introduction
67(1)
Main program
68(1)
The stop statement
69(1)
External subprograms
69(1)
Modules
70(3)
Internal subprograms
73(1)
Arguments of procedures
73(4)
Pointer arguments
75(1)
Restrictions on actual arguments
76(1)
Arguments with the target attribute
77(1)
The return statement
77(1)
Argument intent
77(2)
Functions
79(2)
Prohibited side-effects
80(1)
Explicit and implicit interfaces
81(2)
Procedures as arguments
83(1)
Keyword and optional arguments
84(1)
Scope of labels
85(1)
Scope of names
86(2)
Direct recursion
88(1)
Indirect recursion
89(2)
Overloading and generic interfaces
91(4)
Assumed character length
95(1)
The subroutine and function statements
96(1)
Summary
96(1)
Exercises
97(2)
Array features
99(30)
Introduction
99(1)
Zero-sized arrays
99(1)
Assumed-shape arrays
100(1)
Automatic objects
100(2)
Heap storage
102(4)
Allocatable arrays
102(1)
The allocate statement
103(2)
The deallocate statement
105(1)
The nullify statement
105(1)
Elemental operations and assignments
106(1)
Array-valued functions
106(1)
The where statement and construct
107(3)
The forall statement and construct
110(3)
Pure procedures
113(1)
Elemental procedures
114(2)
Array elements
116(1)
Array subobjects
117(3)
Arrays of pointers
120(1)
Pointers as aliases
121(1)
Array constructors
122(1)
Mask arrays
123(1)
Summary
124(3)
Exercises
127(2)
Specification statements
129(30)
Introduction
129(1)
Implicit typing
129(3)
Declaring entities of differing shapes
132(1)
Named constants and constant expressions
132(3)
Initial values for variables
135(5)
Initialization in type declaration statements
135(1)
The data statement
135(3)
Pointer initialization and the function null
138(1)
Default initialization of components
139(1)
The public and private attributes
140(2)
The pointer, target, and allocatable statements
142(1)
The intent and optional statements
142(1)
The save attribute
143(1)
The use statement
144(3)
Derived-type definitions
147(2)
The type declaration statement
149(1)
Type and type parameter specification
150(1)
Specification expressions
151(2)
Specification functions
152(1)
The namelist statement
153(1)
Summary
154(2)
Exercises
156(3)
Intrinsic procedures
159(22)
Introduction
159(1)
Keyword calls
159(1)
Categories of intrinsic procedures
160(1)
The intrinsic statement
160(1)
Argument intents
160(1)
Inquiry functions for any type
160(1)
Elemental numeric functions
161(2)
Elemental functions that may convert
161(1)
Elemental functions that do not convert
162(1)
Elemental mathematical functions
163(1)
Elemental character and logical functions
164(2)
Character--integer conversions
164(1)
Lexical comparison functions
164(1)
String-handling elemental functions
165(1)
Logical conversion
165(1)
Non-elemental string-handling functions
166(1)
String-handling inquiry function
166(1)
String-handling transformational functions
166(1)
Numeric inquiry and manipulation functions
166(3)
Models for integer and real data
166(1)
Numeric inquiry functions
167(1)
Elemental functions to manipulate reals
168(1)
Transformational functions for kind values
169(1)
Bit manipulation procedures
169(2)
Inquiry function
169(1)
Elemental functions
170(1)
Elemental subroutine
171(1)
Transfer function
171(1)
Vector and matrix multiplication functions
172(1)
Transformational functions that reduce arrays
172(2)
Single argument case
172(1)
Optional argument dim
173(1)
Optional argument mask
173(1)
Array inquiry functions
174(1)
Allocation status
174(1)
Bounds, shape, and size
174(1)
Array construction and manipulation functions
174(2)
The merge elemental function
174(1)
Packing and unpacking arrays
175(1)
Reshaping an array
175(1)
Transformational function for replication
176(1)
Array shifting functions
176(1)
Matrix transpose
176(1)
Transformational functions for geometric location
176(1)
Transformational function for pointer disassociation
177(1)
Non-elemental intrinsic subroutines
177(2)
Real-time clock
177(1)
CPU time
178(1)
Random numbers
179(1)
Summary
179(1)
Exercises
180(1)
Data transfer
181(28)
Introduction
181(1)
Number conversion
181(1)
I/O lists
182(2)
Format definition
184(2)
Unit numbers
186(1)
Internal files
187(1)
Formatted input
188(2)
Formatted output
190(1)
List-directed I/O
190(2)
Name list I/O
192(2)
Non-advancing I/O
194(1)
Edit descriptors
195(8)
Repeat counts
195(2)
Data edit descriptors
197(2)
Minimal field width editing
199(1)
Character string edit descriptor
200(1)
Control edit descriptors
200(3)
Unformatted I/O
203(1)
Direct-access files
203(2)
Execution of a data transfer statement
205(1)
Summary
206(1)
Exercises
207(2)
Operations on external files
209(10)
Introduction
209(1)
File positioning statements
210(2)
The backspace statement
210(1)
The rewind statement
210(1)
The endfile statement
211(1)
Data transfer statements
211(1)
The open statement
212(2)
The close statement
214(1)
The inquire statement
215(3)
Summary
218(1)
Exercises
218(1)
Floating-point exception handling
219(20)
Introduction
219(1)
The IEEE standard
220(1)
Access to the features
221(2)
The Fortran flags
223(1)
Halting
224(1)
The rounding mode
224(1)
The underflow mode (Fortran 2003 only)
225(1)
The module ieee_exceptions
225(3)
Derived types
225(1)
Inquiry functions for IEEE exceptions
226(1)
Subroutines for the flags and halting modes
226(1)
Subroutines for the whole of the floating-point status
227(1)
The module ieee_arithmetic
228(5)
Derived types
228(1)
Inquiry functions for IEEE arithmetic
229(1)
Elemental functions
230(2)
Non-elemental subroutines
232(1)
Transformational function for kind value
232(1)
Examples
233(6)
Dot product
233(1)
Calling alternative procedures
234(1)
Calling alternative in-line code
234(1)
Reliable hypotenuse function
235(2)
Access to IEEE arithmetic values
237(2)
Allocatable array extensions
239(6)
Introduction
239(1)
Allocatable dummy arguments
240(1)
Allocatable functions
240(1)
Allocatable components
241(4)
Enhanced module facilities
245(4)
Introduction
245(1)
Submodules
246(2)
Separate module procedures
246(1)
Submodules of submodules
247(1)
Submodule entities
247(1)
Submodules and use association
248(1)
The advantages of submodules
248(1)
Interoperability with C
249(12)
Introduction
249(1)
Interoperability of intrinsic types
249(2)
Interoperability with C types
251(1)
Interoperability of derived types
252(1)
Interoperability of variables
253(1)
The value attribute
254(1)
Interoperability of procedures
255(1)
Interoperability of global data
256(1)
Invoking a C function from Fortran
257(1)
Invoking Fortran from C
258(2)
Enumerations
260(1)
Type parameters and procedure pointers
261(10)
Introduction
261(1)
Deferred type parameters
261(1)
Type parameter enquiry
262(1)
Parameterized derived types
262(3)
Defining a parameterized derived type
262(2)
Assumed and deferred type parameters
264(1)
Default type parameter values
264(1)
Derived type parameter enquiry
265(1)
Abstract interfaces
265(2)
Procedure pointers
267(3)
Procedure pointer variables
267(1)
Procedure pointer components
267(1)
The pass attribute
268(2)
Exercises
270(1)
Object-oriented programming
271(22)
Introduction
271(1)
Type extension
271(2)
Type extension and type parameters
273(1)
Polymorphic entities
273(2)
Unlimited polymorphic entities
274(1)
The associate construct
275(1)
The select type construct
276(3)
Type-bound procedures
279(5)
Specific type-bound procedures
279(2)
Generic type-bound procedures
281(1)
Type extension and type-bound procedures
282(2)
Deferred bindings and abstract types
284(1)
Finalization
284(3)
Type extension and final subroutines
287(1)
Procedure encapsulation example
287(3)
Type inquiry functions
290(1)
Exercises
291(2)
Establishing and moving data
293(12)
Introduction
293(1)
Mixed component accessibility
293(1)
Structure constructors
293(2)
The allocate statement
295(3)
Typed allocation and deferred type parameters
295(1)
Polymorphic variables and typed allocation
296(1)
Sourced allocation
297(1)
Allocatable entities
298(2)
Allocatable scalars
298(1)
Assignment to an allocatable array
298(1)
Transferring an allocation
299(1)
Pointer assignment
300(1)
More control of access from a module
300(1)
Renaming operators on the use statement
301(1)
Array constructor syntax
302(1)
Specification and initialization expressions
303(2)
Miscellaneous enhancements
305(16)
Introduction
305(1)
Pointer intent
305(1)
The volatile attribute
305(3)
Volatile semantics
306(1)
Volatile scoping
307(1)
Volatile arguments
308(1)
The import statement
308(2)
Intrinsic modules
310(1)
Access to the computing environment
311(1)
Environment variables
311(1)
Command arguments and the command line
312(1)
Support for internationalization
312(4)
Character sets
313(1)
ASCII character set
313(1)
ISO 10646 character set
314(1)
UTF-8 files
314(1)
Decimal comma for input/output
315(1)
Lengths of names and statements
316(1)
Binary, octal, and hexadecimal constants
316(1)
Other changes to intrinsic functions
317(1)
Error message retrieval
318(1)
Enhanced complex constants
318(1)
Interface block extensions
318(3)
Input/output enhancements
321(10)
Introduction
321(1)
Non-default derived-type input/output
321(3)
Asynchronous input/output
324(2)
The asynchronous attribute
326(1)
Input and output of IEEE exceptional values
327(1)
Stream access input/output
327(1)
Recursive input/output
328(1)
The flush statement
328(1)
Comma after a P edit descriptor
328(1)
The iomsg=specifier
329(1)
The round=specifier
329(1)
The sign=specifier
329(1)
Kind type parameters of integer specifiers
329(1)
Intrinsic functions for I/O status testing
329(2)
Other features
331(16)
Introduction
331(1)
Storage association
331(6)
Storage units
331(1)
The equivalence statement
332(2)
The common block
334(2)
The block data program unit
336(1)
Shape and character length disagreement
337(2)
The entry statement
339(1)
The include line
340(1)
The do while form of loop control
341(1)
Double precision real
341(1)
The dimension and parameter statements
342(1)
Specific names of intrinsic procedures
343(4)
A Intrinsic procedures
347(6)
B Obsolescent features
353(8)
Obsolescent in Fortran 95
353(6)
Fixed source form
353(1)
Computed go to
354(1)
Character length specification character*
354(1)
Data statements among executables
355(1)
Statement functions
355(1)
Assumed character length of function results
356(1)
Arithmetic if statement
357(1)
Shared do-loop termination
357(1)
Alternate return
358(1)
Feature deleted in Fortran 2003: Carriage control
359(1)
Features deleted in Fortran 95
359(2)
C Pointer example
361(10)
D Avoiding compilation cascades
371(4)
E Fortran terms
375(16)
F Solutions to exercises
391(14)
Index 405

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.