|
1 Introduction to Programming in Fortran |
|
|
1 | (46) |
|
1.1 Programs that Calculate and Print |
|
|
1 | (3) |
|
|
4 | (8) |
|
|
12 | (7) |
|
1.4 The Form of a Fortran Program |
|
|
19 | (2) |
|
1.5 Some Intrinsic Functions |
|
|
21 | (3) |
|
1.6 Expressions and Assignment |
|
|
24 | (5) |
|
1.7 Introduction to Formatting |
|
|
29 | (5) |
|
1.8 Case Study: Quadratic Formula |
|
|
34 | (8) |
|
1.9 Case Study: Debugging Pendulum Calculations |
|
|
42 | (5) |
|
|
47 | (32) |
|
|
47 | (2) |
|
|
49 | (13) |
|
|
62 | (3) |
|
|
65 | (6) |
|
2.5 Case Study: Numerical Integration I |
|
|
71 | (4) |
|
|
75 | (2) |
|
|
77 | (1) |
|
2.8 The go to and continue Statements |
|
|
78 | (1) |
|
|
79 | (40) |
|
|
79 | (3) |
|
|
82 | (1) |
|
|
83 | (1) |
|
3.4 Putting Procedures in a Module |
|
|
84 | (2) |
|
|
86 | (3) |
|
|
89 | (3) |
|
3.7 Pure Procedures and Side Effects |
|
|
92 | (1) |
|
|
93 | (4) |
|
|
97 | (1) |
|
|
98 | (1) |
|
3.11 Using a Function in a Declaration Statement |
|
|
98 | (1) |
|
3.12 The return Statement |
|
|
99 | (1) |
|
|
99 | (2) |
|
3.14 Case Study: Numerical Integration II |
|
|
101 | (2) |
|
3.15 Case Study: Calculating Probabilities I |
|
|
103 | (2) |
|
|
105 | (8) |
|
3.17 Case Study: Adaptive Numerical Integration |
|
|
113 | (6) |
|
|
119 | (42) |
|
4.1 Declaring and Using Arrays |
|
|
119 | (16) |
|
|
135 | (7) |
|
|
142 | (6) |
|
|
148 | (2) |
|
4.5 Case Study: Solving Linear Equations |
|
|
150 | (5) |
|
4.6 Case Study: Heat Transfer I |
|
|
155 | (2) |
|
4.7 Case Study: Calculating Probabilities II |
|
|
157 | (4) |
|
|
161 | (34) |
|
5.1 Use of Character Data in Fortran Programs |
|
|
161 | (13) |
|
|
174 | (13) |
|
5.3 Case Study: Expression Evaluation |
|
|
187 | (8) |
|
6 Structures and Derived Types |
|
|
195 | (10) |
|
|
195 | (1) |
|
|
196 | (4) |
|
6.3 Declaring and Using Structures |
|
|
200 | (5) |
|
7 IEEE Arithmetic and Exceptions |
|
|
205 | (6) |
|
7.1 Numerical Representations |
|
|
205 | (1) |
|
|
206 | (3) |
|
|
209 | (2) |
|
8 More about Modules and Procedures |
|
|
211 | (20) |
|
|
211 | (2) |
|
8.2 Date and Time Subroutines |
|
|
213 | (1) |
|
8.3 Command-Line Arguments |
|
|
214 | (1) |
|
8.4 Environment Variables |
|
|
215 | (1) |
|
8.5 Executing a System Command |
|
|
215 | (1) |
|
|
216 | (3) |
|
|
219 | (2) |
|
8.8 More Array Intrinsic Procedures |
|
|
221 | (3) |
|
8.9 Bit Intrinsic Procedures |
|
|
224 | (1) |
|
8.10 Calling C Procedures |
|
|
225 | (6) |
|
|
231 | (22) |
|
|
231 | (2) |
|
|
233 | (2) |
|
9.3 User-Defined Operators |
|
|
235 | (1) |
|
9.4 Extending Intrinsic Functions |
|
|
235 | (2) |
|
|
237 | (2) |
|
9.6 Case Study: Computing with Big Integers |
|
|
239 | (14) |
|
10 Pointer and Allocatable Variables |
|
|
253 | (26) |
|
10.1 The Use of Pointers in Fortran |
|
|
253 | (9) |
|
10.2 Moving Pointers vs. Moving Data |
|
|
262 | (1) |
|
|
263 | (9) |
|
|
272 | (7) |
|
|
279 | (48) |
|
|
280 | (2) |
|
|
282 | (7) |
|
11.3 Data Transfer Statements |
|
|
289 | (12) |
|
|
301 | (4) |
|
|
305 | (1) |
|
11.6 The inquire Statement |
|
|
305 | (6) |
|
11.7 File Positioning Statements |
|
|
311 | (1) |
|
|
312 | (15) |
|
12 Object-Oriented Programming |
|
|
327 | (12) |
|
|
327 | (1) |
|
|
328 | (1) |
|
12.3 Procedures and Derived Types |
|
|
329 | (2) |
|
12.4 Case Study: Traffic Queues |
|
|
331 | (8) |
|
|
339 | (34) |
|
|
339 | (1) |
|
13.2 A Simple Program Using Coarrays |
|
|
339 | (2) |
|
13.3 Coarray Declarations |
|
|
341 | (1) |
|
13.4 Referencing a Value on Another Image |
|
|
341 | (1) |
|
13.5 The sync all Statement |
|
|
342 | (1) |
|
|
342 | (1) |
|
|
343 | (1) |
|
13.8 A More Realistic Sorting Example |
|
|
344 | (3) |
|
13.9 Compiling a Program with Coarrays |
|
|
347 | (1) |
|
13.10 Definition of Coarray |
|
|
347 | (2) |
|
|
349 | (2) |
|
13.12 Allocatable Coarrays |
|
|
351 | (1) |
|
13.13 Case Study: Heat Transfer II |
|
|
352 | (10) |
|
13.14 Coarray Rules and Restrictions |
|
|
362 | (3) |
|
13.15 Case Study: Job Scheduling I |
|
|
365 | (3) |
|
|
368 | (1) |
|
13.17 Case Study: Job Scheduling II |
|
|
368 | (3) |
|
|
371 | (2) |
|
|
373 | (14) |
|
|
373 | (1) |
|
A.2 Elemental Intrinsic Procedures |
|
|
373 | (1) |
|
A.3 Positional Arguments or Argument Keywords |
|
|
374 | (1) |
|
A.4 Argument Presence Inquiry Function |
|
|
374 | (1) |
|
A.5 Numeric, Mathematical, Character, and Logical Procedures |
|
|
374 | (3) |
|
A.6 Numeric Manipulation and Inquiry Functions |
|
|
377 | (2) |
|
A.7 Bit Manipulation and Inquiry Procedures |
|
|
379 | (1) |
|
A.8 Array Intrinsic Functions |
|
|
380 | (3) |
|
A.9 Pointer Nullify and Association Status Inquiry Functions |
|
|
383 | (1) |
|
A.10 Type Extension Inquiry Functions |
|
|
383 | (1) |
|
A.11 Date and Time Subroutines |
|
|
384 | (1) |
|
A.12 Pseudorandom Numbers |
|
|
384 | (1) |
|
|
384 | (1) |
|
A.14 Testing Input/Output Status |
|
|
384 | (1) |
|
A.15 Command Line Manipulation |
|
|
385 | (1) |
|
|
385 | (1) |
|
|
385 | (2) |
|
|
387 | (10) |
Index |
|
397 | |