دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش: 4th
نویسندگان: Ian Chivers. Jane Sleightholme
سری:
ISBN (شابک) : 9783319755021
ناشر: Springer
سال نشر: 2018
تعداد صفحات: 959
زبان: English
فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود)
حجم فایل: 5 مگابایت
در صورت تبدیل فایل کتاب Introduction to Programming with Fortran به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب مقدمه ای بر برنامه نویسی با فرترن نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
این نسخه چهارم نمونههای جدیدی را در مورد زیرماژولها، نوع مشتق شده i/o، برنامهنویسی شی گرا، رابطهای انتزاعی و نشانگرهای رویه، C interop، مرتبسازی و جستجو، آمار و تبدیل به نسخههای مدرنتر Fortran ارائه میکند. ویژگیهای کلیدی ویژگیهای زبان اصلی Fortran مدرن را برجسته میکند، از جمله تایپ داده، پردازش آرایه، ساختارهای کنترل، توابع، زیر روالها، ماژولها و زیرماژولها، انواع تعریفشده توسط کاربر، نشانگرها، بارگذاری بیش از حد اپراتور، برنامهنویسی عمومی، برنامهنویسی موازی، رابطهای انتزاعی، اشارهگرهای رویه. مشکلاتی که هنگام برنامه نویسی رخ می دهد استفاده از چندین کامپایلر را نشان می دهد مقدمه برنامه نویسی با فرترن برای افراد مبتدی با سابقه برنامه نویسی کم یا بدون پیشینه برنامه نویسی و همچنین برنامه نویسان فرترن موجود و کسانی که تجربه برنامه نویسی در زبان های دیگر دارند نوشته شده است.
This fourth Edition presents new examples on submodules, derived type i/o, object oriented programming, abstract interfaces and procedure pointers, C interop, sorting and searching, statistics and converting to more modern versions of Fortran. Key Features Highlights the core language features of modern Fortran including data typing, array processing, control structures, functions, subroutines, modules and submodules, user defined types, pointers, operator overloading, generic programming, parallel programming, abstract interfaces, procedure pointers Pinpoints common problems that occur when programming Illustrates the use of several compilers Introduction to Programming with Fortran has been written for the complete beginner with little or no programming background as well as existing Fortran programmers and those with programming experience in other languages
Contents......Page 4
Tables......Page 26
1.1 Introduction......Page 28
1.2 Program Examples......Page 31
1.3 Web Addresses......Page 32
2 Intro to Problem Solving......Page 33
2.3 Artificial Language......Page 34
2.5 Algorithms......Page 35
2.5.2 Bottom-Up......Page 36
2.6 Modular Programming......Page 37
2.8.1 Problem Definition......Page 38
2.8.6 Implementation......Page 39
2.9 Unified Modelling Language - UML......Page 40
2.12 Bibliography......Page 41
3.1 Introduction......Page 45
3.5 The Early Days......Page 46
3.5.2 Fortran 77......Page 47
3.5.4 Algol......Page 48
3.7 Lisp......Page 49
3.9.2 Simula......Page 50
3.9.5 Basic......Page 51
3.9.6 C......Page 52
3.10.3 Data Structuring and Procedural Programming......Page 53
3.11 Ada......Page 54
3.13 Modula 2......Page 55
3.14.2 Postscript, TeX and LaTeX......Page 56
3.14.5 ICON......Page 57
3.15.2 Smalltalk......Page 58
3.15.4 Eiffel......Page 59
3.15.5 C++......Page 60
3.15.6 Java......Page 61
3.15.8 Python......Page 62
3.16.2 Fortran 95......Page 64
3.16.4 Fortran 2003......Page 65
3.16.6 Fortran 2008......Page 67
3.16.8 Fortran 2018......Page 69
3.18 ACM Fortran Forum......Page 72
3.21 Bibliography......Page 73
4.1 Introduction......Page 80
4.3 Elements of a Programming Language......Page 81
4.3.4 Input and Output (I/O) Statements......Page 82
4.4 Example 1: Simple Text I/O......Page 83
4.5 Variables — Name, Type and Value......Page 84
4.6 Example 2: Simple Numeric I/O and Arithmetic......Page 85
4.7 Some More Fortran Rules......Page 86
4.8 Fortran Character Set......Page 87
4.9 Good Programming Guidelines......Page 89
4.10 Compilers Used......Page 90
4.11.1 gfortran......Page 91
4.11.3 Intel......Page 92
4.11.5 Oracle/Sun......Page 93
4.12 Program Development......Page 94
4.13 Problems......Page 95
5 Arithmetic......Page 96
5.2 The Fortran Operators and the Arithmetic Assignment Statement......Page 97
5.3 Example 1: Simple Arithmetic Expressions in Fortran......Page 98
5.4 The Fortran Rules for Arithmetic......Page 99
5.5 Expression Equivalence......Page 101
5.7 Example 2: Type Conversion and Assignment......Page 102
5.8 Example 3: Integer Division and Real Assignment......Page 103
5.9 Example 4: Time Taken for Light to Travel from the Sun to Earth......Page 104
5.10 The Parameter Attribute......Page 105
5.11 Round Off Errors and Computer Arithmetic......Page 106
5.12 Relative and Absolute Errors......Page 107
5.13 Example 5: Relative and Absolute Error......Page 108
5.14 Range, Precision and Size of Numbers......Page 109
5.15.1 Example 6: Overflow......Page 110
5.15.2 Example 7: Underflow......Page 111
5.16.2 Fortran Representational Models......Page 112
5.17.1 Example 8: Testing What Kind Types Are Available......Page 114
5.18 Testing the Numerical Representation of Different Kind Types on a System......Page 115
5.19 Example 9: Using the Numeric Inquiry Functions with Integer Types......Page 116
5.20 Example 10: Using the Numeric Inquiry Functions with Real Types......Page 118
5.22 Example 11: Literal Real Constants in a Calculation......Page 122
5.23 Summation and Finite Precision......Page 123
5.24 Example 13: Binary Representation of Different Integer Kind Type Numbers......Page 124
5.25 Example 14: Binary Representation of a Real Number......Page 126
5.26 Example 15: Initialisation of Physical Constants, Version 1......Page 127
5.28 Example 17: Initialisation of Physical Constants, Version 3......Page 129
5.29 Summary of How to Select the Appropriate Kind Type......Page 130
5.31 Fortran and the IEEE 754 Standard......Page 131
5.33 Bibliography......Page 132
5.34 Problems......Page 133
6.1 Tables of Data......Page 137
6.1.2 Book Catalogue......Page 138
6.1.4 Monthly Rainfall......Page 139
6.2.3 Control Structure......Page 140
6.3 Example 1: Monthly Rainfall......Page 141
6.4 Possible Missing Data......Page 143
6.5 Example 2: People's Weights and Setting the Array Size With a Parameter......Page 145
6.6 Summary......Page 146
6.7 Problems......Page 147
7 Arrays - Examples......Page 150
7.1.1 Example 1: Allocatable Arrays......Page 151
7.2.1 Example 2: Two Dimensional Arrays and a Map......Page 152
7.2.2 Example 3: Sensible Tabular Output......Page 154
7.2.3 Example 4: Average of Three Sets of Values......Page 155
7.2.4 Example 5: Booking Arrangements in a Theatre or Cinema......Page 156
7.3.1 Example 6: Voltage from –20 to +20 Volts......Page 157
7.3.2 Example 7: Longitude from –180 to +180......Page 158
7.4.1 Example 8: Table of Liquid Conversion Measurements......Page 159
7.4.2 Example 9: Means and Standard Deviations......Page 160
7.5 Summary......Page 161
7.6 Problems......Page 162
8.1 Terminology......Page 165
8.4 Assignment......Page 166
8.5 Expressions......Page 167
8.6 Example 1: Rank 1 Whole Arrays in Fortran......Page 168
8.7 Example 2: Rank 2 Whole Arrays in Fortran......Page 169
8.8.1 Example 3: Rank 1 Array Sections......Page 170
8.8.2 Example 4: Rank 2 Array Sections......Page 171
8.9.1 Example 5: Rank 1 Array Initialisation — Explicit Values......Page 172
8.9.2 Example 6: Rank 1 Array Initialisation Using an Implied Do Loop......Page 173
8.9.4 Initialising Rank 2 Arrays......Page 174
8.9.5 Example 8: Initialising a Rank 2 Array......Page 175
8.10.1 Example 9: Rank 1 Arrays and a Stride of 2......Page 176
8.10.2 Example 10: Rank 1 Array and the Sum Intrinsic Function......Page 177
8.10.3 Example 11: Rank 2 Arrays and the Sum Intrinsic Function......Page 178
8.10.4 Example 12: Masked Array Assignment and the where Statement......Page 179
8.10.5 Notes......Page 180
8.11.1 Example 13: Array Element Ordering......Page 181
8.12 Physical and Virtual Memory......Page 182
8.14 Summary......Page 183
8.16.2 AMD......Page 184
8.16.3 Intel......Page 185
9 Output of Results......Page 186
9.2.1 Example 1: Twelve Times Table......Page 187
9.2.2 Example 2: Integer Overflow and the i Edit Descriptor......Page 188
9.3.1 Example 3: Imperial Pints and US Pints......Page 189
9.3.2 Example 4: Imperial Pints and Litres......Page 190
9.3.3 Example 5: Narrow Field Widths and the f Edit Descriptor......Page 191
9.4 Reals and the e Edit Descriptor......Page 192
9.4.1 Example 7: Simple e Edit Descriptor Example......Page 193
9.5.1 Example 8: Simple g Edit Descriptor Example......Page 194
9.6.1 Example 9: Three Ways of Generating Spaces......Page 195
9.7.1 Example 10: Character Output and the a Edit Descriptor......Page 196
9.7.2 Example 11: Character, Integer and Real Output in a Format Statement......Page 197
9.9.1 The open Statement......Page 198
9.9.3 Example 12: Open and Close Usage......Page 199
9.9.4 Example 13: Timing of Writing Formatted Files......Page 200
9.9.5 Example 14: Timing of Writing Unformatted Files......Page 202
9.10 Example 15: Implied Do Loops and Array Sections for Array Output......Page 203
9.12 Example 17: Choosing the Decimal Symbol......Page 205
9.13 Example 18: Alternative Format Specification Using a String......Page 206
9.15 The Remaining Control and Data Edit Descriptors......Page 207
9.16 Summary......Page 208
9.17 Problems......Page 209
10.1 Reading from Files......Page 211
10.2 Example 1: Reading Integer Data......Page 212
10.3 Example 2: Reading Real Data......Page 214
10.4 Met Office Historic Station Data......Page 215
10.5 Example 3: Reading One Column of Data from a File......Page 216
10.6 Example 4: Skipping Lines in a File......Page 218
10.7 Example 5: Reading from Several Files Consecutively......Page 219
10.8 Example 6: Reading Using Array Sections......Page 221
10.9 Example 7: Reading Using Internal Files......Page 223
10.10 Example 8: Timing of Reading Formatted Files......Page 224
10.11 Example 9: Timing of Reading Unformatted Files......Page 225
10.12 Summary......Page 226
10.13 Problems......Page 227
11.1 I/O Concepts and Statements......Page 228
11.4 The open Statement......Page 229
11.5 Data Transfer Statements......Page 230
11.6 The inquire Statement......Page 231
11.7 Error, End of Record and End of File......Page 232
11.7.4 iostat= Specifier......Page 233
11.8.1 Example 1: Simple Use of the read, write, open, close, unit Features......Page 234
11.8.2 Example 2: Using iostat to Test for Errors......Page 235
11.8.3 Example 3: Use of newunit and lentrim......Page 236
11.11 Problems......Page 238
12.1 Introduction......Page 239
12.2 An Introduction to Predefined Functions and Their Use......Page 240
12.2.1 Example 1: Simple Function Usage......Page 241
12.4.1 Example 3: Elemental Function Use......Page 242
12.5.2 Example 5: Intrinsic dot_product Use......Page 243
12.7 Example 6: Easter......Page 244
12.8 Intrinsic Procedures......Page 246
12.9.1 Example 7: Simple User Defined Function......Page 247
12.10 An Introduction to the Scope of Variables, Local Variables and Interface Checking......Page 249
12.11.1 Example 8: Recursive Factorial Evaluation......Page 250
12.12 Example 9: Recursive Version of gcd......Page 252
12.13 Example 10: gcd After Removing Recursion......Page 253
12.14.1 Example 11: Stirling's Approximation......Page 254
12.15 Pure Functions......Page 255
12.16 Elemental Functions......Page 256
12.18 Formal Syntax......Page 257
12.19 Rules and Restrictions......Page 258
12.21 Bibliography......Page 259
12.21.1 Recursion and Problem Solving......Page 260
13 Control Structures & Execution Control......Page 261
13.2 Selection Among Courses of Action......Page 262
13.3 The Block If Statement......Page 263
13.3.1 Example 1: Quadratic Roots......Page 265
13.3.2 Example 2: Date Calculation......Page 266
13.4 The Case Statement......Page 267
13.4.1 Example 3: Simple Calculator......Page 268
13.4.2 Example 4: Counting Vowels, Consonants, etc.......Page 269
13.5 The Various Forms of the Do Statement......Page 270
13.5.1 Example 5: Sentinel Usage......Page 271
13.5.3 Example 6: The Evaluation of e**x......Page 272
13.5.4 Example 7: Wave Breaking on an Offshore Reef......Page 274
13.6 Do Concurrent......Page 275
13.7.1 Control Structure Formal Syntax......Page 278
13.8 Problems......Page 279
13.9 Bibliography......Page 281
14.1 Introduction......Page 282
14.2 Character Input......Page 283
14.2.2 Example 2: The a Edit Descriptor......Page 284
14.3 Character Operators......Page 285
14.4 Character Substrings......Page 286
14.5.1 Example 4: The index Character Function......Page 287
14.5.3 Example 5: Using len and len_trim......Page 288
14.6 Collating Sequence......Page 289
14.7 Example 6: Finding Out About the Character Set Available......Page 290
14.8.1 Example 7: Using the scan Function......Page 292
14.9 Summary......Page 293
14.10 Problems......Page 294
15.1 Introduction......Page 297
15.2 Example 1: Use of cmplx, aimag and conjg......Page 298
15.3 Example 2: Polar Coordinate Example......Page 299
15.6 Problem......Page 300
16.1 Introduction......Page 302
16.2 I/O......Page 305
16.4 Problems......Page 306
17.1 Introduction......Page 307
17.2 Example 1: Dates......Page 308
17.4.1 Example 2: Variant of Example 1 Using Modules......Page 309
17.5 Example 3: Address Lists......Page 310
17.6 Example 4: Nested User Defined Types......Page 312
17.7 Problem......Page 314
18.1 Introduction......Page 315
18.2 Example 1: Illustrating Some Basic Pointer Concepts......Page 316
18.4 Example 3: Referencing Pointer Variables Before Allocation or Pointer Assignment......Page 318
18.4.2 Intel......Page 319
18.5 Example 4: Pointer Allocation and Assignment......Page 320
18.6.1 Example 5: Simple Memory Leak......Page 321
18.6.2 Example 6: More Memory Leaks......Page 322
18.7.1 Example 7: Using the C loc Function......Page 323
18.8 Problems......Page 324
19.1 Introduction......Page 326
19.2 Example 1: Roots of a Quadratic Equation......Page 327
19.2.1 Referencing a Subroutine......Page 329
19.2.5 Local Variables and the save Attribute......Page 330
19.2.8 Modules `Containing' Procedures......Page 331
19.4 Summary......Page 332
19.5 Problems......Page 333
20.1.1 Assumed-Shape Array......Page 334
20.1.5 Keyword and Optional Arguments......Page 335
20.2 Example 1: Assumed Shape Parameter Passing......Page 336
20.3 Example 2: Character Arguments and Assumed-Length Dummy Arguments......Page 338
20.4 Example 3: Rank 2 and Higher Arrays as Parameters......Page 340
20.4.1 Notes......Page 341
20.5 Example 4: Automatic Arrays and Median Calculation......Page 342
20.6 Example 5: Recursive Subroutines – Quicksort......Page 345
20.6.2 Note — Flexible Design......Page 348
20.7 Example 6: Allocatable Dummy Arrays......Page 349
20.8 Example 7: Elemental Subroutines......Page 352
20.10 Problems......Page 353
20.12 Commercial Numerical and Statistical Subroutine Libraries......Page 355
21.1 Introduction......Page 356
21.3 Modules for Global Data......Page 357
21.4 Example 1: Modules for Precision Specification and Constant Definition......Page 358
21.5 Example 2: Modules for Globally Sharing Data......Page 360
21.6 Modules for Derived Data Types......Page 362
21.7 Example 3: Person Data Type......Page 363
21.8 Example 4: A Module for Simple Timing of a Program......Page 365
21.9 private, public and protected Attributes......Page 366
21.12 Example 5: Modules and Include Statements......Page 367
21.13.1 Interface......Page 368
21.14 Summary......Page 369
21.15 Problems......Page 370
22.2 Example 1: Singly Linked List: Reading an Unknown Amount of Text......Page 371
22.3 Example 2: Reading in an Arbitrary Number of Reals Using a Linked List and Copying to an Array......Page 375
22.4 Example 3: Ragged Arrays......Page 377
22.5 Example 4: Ragged Arrays and Variable Sized Data Sets......Page 378
22.6 Example 5: Perfectly Balanced Tree......Page 381
22.7 Example 6: Date Class......Page 384
22.8 Example 7: Date Data Type with USA and ISO Support......Page 395
22.9 Bibliography......Page 400
22.10 Problems......Page 401
23.1 Introduction......Page 402
23.3 Brief Explanation......Page 403
23.4 Example 1: Order Calculations......Page 404
23.5 Sorting......Page 405
23.7 Bibliography......Page 406
24.2 Other Languages......Page 408
24.3 Example 1: Overloading the Addition (+) Operator......Page 409
24.4 Problem......Page 410
25.2 Generic Programming and Other Languages......Page 411
25.3 Example 1: Sorting Reals and Integers......Page 412
25.3.1 Generic Quicksort in C++......Page 420
25.3.2 Generic Quicksort in C#......Page 421
25.4 Example 2: Generic Statistics Module......Page 423
25.5 Problems......Page 429
25.6.3 Generic Programming and C#......Page 430
26 Mathematical & Numerical Examples......Page 431
26.2.1 Inner Product of Two Sparse Vectors......Page 432
26.3 Example 2: Solving a System of First-Order Ordinary Differential Equations Using Runge–Kutta–Merson......Page 437
26.3.2 Note: Automatic Arrays......Page 444
26.3.4 Note: Compilation When Using Modules......Page 445
26.3.5 Keyword and Optional Argument Variation......Page 446
26.4 Example 3: A Subroutine to Extract the Diagonal Elements of a Matrix......Page 447
26.5 Example 4: The Solution of Linear Equations Using Gaussian Elimination......Page 448
26.5.1 Notes......Page 453
26.6 Example 5: Allocatable Function Results......Page 454
26.7 Example 6: Elemental e**x Function......Page 455
26.8 Example 7: Absolute and Relative Errors Involved in Subtraction Using 32 bit Reals......Page 457
26.9 Example 8: Absolute and Relative Errors Involved in Subtraction Using 64 bit Reals......Page 458
26.11 Bibliography......Page 460
27.1 Introduction......Page 462
27.2 Example 1: Linked List Parameterised by Real Kind......Page 463
27.3 Example 2: Ragged Array Parameterised by Real Kind Type......Page 465
27.4 Example 3: Specifying len in a PDT......Page 466
27.5 Problems......Page 469
28.2 Brief Review of the History of Object Oriented Programming......Page 470
28.3 Background Technical Material......Page 471
28.3.5 Class......Page 472
28.3.7 Passed Object Dummy Arguments......Page 473
28.3.9 Structure Constructors and Generic Names......Page 474
28.3.12 Defined Assignment Statement......Page 475
28.3.16 The select type Construct......Page 476
28.4 Example 1: The Basic Shape Class......Page 477
28.4.1 Key Points......Page 479
28.5 Example 2: Base Class with Private Data......Page 482
28.6 Example 3: Using an Interface to Use the Class Name for the Structure Constructor......Page 484
28.6.1 Public and Private Accessibility......Page 486
28.7.2 Circle - Derived Type 1......Page 487
28.7.3 Rectangle - Derived Type 2......Page 490
28.7.4 Simple Inheritance Test Program......Page 492
28.8.1 Base Shape Class......Page 494
28.8.2 Circle - Derived Type 1......Page 496
28.8.5 Display Subroutine......Page 497
28.8.6 Test Program for Polymorphism and Dynamic Binding......Page 498
28.9 Fortran 2008 and Polymorphic Intrinsic Assignment......Page 501
28.11 Problems......Page 503
28.12 Further Reading......Page 504
29.1 Introduction......Page 505
29.3 Example 1: The Base Date Class......Page 506
29.3.2 Date Module......Page 508
29.3.3 Diff Output Between Original Module and New oo Module......Page 515
29.3.4 Main Program......Page 523
29.3.5 Diff Output Between Original Program and New oo Test Program......Page 526
29.4.1 ISO Date Module......Page 531
29.4.2 ISO Test Program......Page 535
29.5.1 Date Wrapper Module......Page 539
29.5.2 Polymorphic and Dynamic Binding Test Program......Page 540
29.6.1 Calendars......Page 541
29.6.2 Date Formats......Page 542
29.6.5 References......Page 543
29.7 An Abstract Base Class in Fortran......Page 544
29.8 Problems......Page 548
29.9 Bibliography......Page 550
30.1 Introduction......Page 551
30.2 Brief Technical Background......Page 552
30.3 Example 1: Rewrite of the Date Class Using Submodules......Page 554
30.4 Example 2: Rewrite of the First Order RKM ODE Solver Using Modules......Page 568
30.6 Bibliography......Page 574
31.1 Introduction......Page 575
31.3 Amdahl's Law......Page 577
31.3.2 Amdahl's Law Graph 2–64 Processors or Cores......Page 578
31.5 Memory Access......Page 579
31.7 Bandwidth and Latency......Page 580
31.10 Threads and Threading......Page 581
31.16 Locks......Page 582
31.20 Fortran and Parallel Programming......Page 583
31.21 MPI......Page 584
31.22 OpenMP......Page 585
31.24 Other Parallel Options......Page 586
31.25 Top 500 Supercomputers......Page 587
31.26 Summary......Page 588
32.2 MPI Programming......Page 589
32.4.1 MPICH2......Page 590
32.5.1 Cray Archer System......Page 591
32.7 Example 1: Hello World......Page 592
32.8 Example 2: Hello World Using Send and Receive......Page 594
32.9 Example 3: Serial Solution for pi Calculation......Page 598
32.10 Example 4: Parallel Solution for pi Calculation......Page 602
32.11 Example 5: Work Sharing Between Processes......Page 608
32.13 Problem......Page 612
33.1 Introduction......Page 613
33.2 OpenMP Memory Model......Page 614
33.3 Example 1: Hello World......Page 615
33.4 Example 2: Hello World Using Default Variable Data Scoping......Page 618
33.5 Example 3: Hello World with Private thread_number variable......Page 620
33.6 Example 4: Parallel Solution for pi Calculation......Page 621
33.7 Example 5: Comparing the Timing of Whole Array Syntax, Simple Do Loops, Do Concurrent and an OpenMP Solution......Page 624
33.9 Problem......Page 627
34.1 Introduction......Page 628
34.2 Some Basic Coarray Terminology......Page 629
34.3 Example 1: Hello World......Page 630
34.4 Example 2: Broadcasting Data......Page 631
34.5 Example 3: Parallel Solution for pi Calculation......Page 632
34.6 Example 4: Work Sharing......Page 635
34.8 Problem......Page 639
35.2 The iso_c_binding Module......Page 640
35.3 Named Constants and Derived Types in the Module......Page 641
35.6 Interoperability of Intrinsic Types......Page 642
35.7.5 Interoperation with C Global Variables......Page 643
35.8 Compilers Used in the Examples......Page 644
35.9 Example 1: Kind Type Support......Page 645
35.10 Example 2: Fortran Calling a C Function......Page 647
35.11 Example 3: C Calling a Fortran Function......Page 648
35.12 Example 4: C++ Calling a Fortran Function......Page 649
35.13 Example 5: Passing an Array from Fortran to C......Page 650
35.14 Example 6: Passing an Array from C to Fortran......Page 651
35.15 Example 7: Passing an Array from C++ to Fortran......Page 652
35.16 Example 8: Passing a Rank 2 Array from Fortran to C......Page 653
35.17 Example 9: Passing a Rank 2 Array from C to Fortran......Page 654
35.18 Example 10: Passing a Rank 2 Array from C++ to Fortran......Page 656
35.19 Example 11: Passing a Rank 2 Array from C++ to Fortran and Taking Care of Array Storage......Page 658
35.19.1 Compiler Switches......Page 660
35.20 Example 12: Passing a Rank 2 Array from C to Fortran and Taking Care of Array Storage......Page 661
35.20.1 Compiler Switches......Page 663
35.21 Example 13: Passing a Fortran Character Variable to C......Page 664
35.22 Example 14: Passing a Fortran Character Variable to C++......Page 667
35.23.1 c_loc(x) Description......Page 669
35.24 Problem......Page 671
36.2 History......Page 672
36.3 IEEE Specifications......Page 674
36.5 Procedure Summary......Page 676
36.6 General Comments About the Standard......Page 678
36.7 Resume......Page 679
36.9.1 ieee_exceptions......Page 680
36.9.2 ieee_arithmetic......Page 681
36.10 Example 1: Testing IEEE Support......Page 682
36.11 Example 2: Testing What Flags Are Supported......Page 683
36.13 Example 4: Underflow......Page 685
36.14 Example 5: Inexact Summation......Page 686
36.15 Example 6: NAN and Other Specials......Page 689
36.16 Summary......Page 690
36.17.1 Web-Based Sources......Page 691
36.17.2 Hardware Sources......Page 692
36.17.3 Operating Systems......Page 693
36.18 Problem......Page 694
37.1 Introduction......Page 695
37.3 Example1: Basic Syntax, No Parameters in Call......Page 697
37.4 Example2: Extended Syntax, Passing Parameters......Page 700
37.5 Example3: Basic Syntax with Timing......Page 705
37.6 Example4: Extended Syntax with Timing......Page 707
37.8 Problem......Page 708
38.1 Example 1: Generic Recursive Quicksort Example with Timing Details......Page 709
38.2 Example 2: Non Recursive Quicksort Example with Timing Details......Page 714
38.2.1 Notes - Version Control Systems......Page 720
38.5 Example 3: Calling the Nag m01caf Sorting Routine......Page 721
38.6 Example 4: Sorting an Array of a Derived Type......Page 724
38.6.3 Date Module......Page 725
38.6.4 Sort Module......Page 731
38.6.5 Main Program......Page 732
38.7 Example 5: Binary Search Example......Page 734
38.8 Problems......Page 738
39.2 Example 1: Program to Download and Save the Data Files Locally......Page 739
39.3 Example 2: The Sed Script and Command File That Converts the Missing Values......Page 742
39.4 Example 3: The Program to Do the Statistics Calculations......Page 743
39.5 Example 4: Met Office Utility Program......Page 752
39.6 Bibliography......Page 757
39.7 Problem......Page 758
40.1 Introduction......Page 759
40.2 Deleted Features from Fortran 90......Page 760
40.4 Obsolescent Features......Page 761
40.4.4 DATA Statements Among Executables......Page 762
40.4.8 ENTRY Statements......Page 763
40.5 Better Alternatives......Page 764
40.6 Free and Commercial Conversion Tools......Page 765
40.6.3 Nag Compiler Polish Tool......Page 766
40.7.1 Original Fortran 66......Page 767
40.7.3 Fortran 90 Version......Page 768
40.8 Example 2: Leaving as Fortran 77......Page 769
40.9 Example 3: Simple Conversion to Fortran 90......Page 770
40.10 Example 4: Simple Syntax Conversion to Modern Fortran......Page 775
40.11 Example 5: Date Case Study......Page 781
40.12 Example 6: Creating 64 Bit Integer and 128 Bit Real Sorting Subroutines from the Netlib Sorting Routines......Page 790
40.14 Problems......Page 802
41.2 The Dislin Graphics Library......Page 803
41.3 Example 1: Using Dislin to Plot Amdahl's Law Graph 1 – 8 Processors or Cores......Page 804
41.4 Example 2: Using Dislin to Plot Amdahl's Law Graph 2 – 64 Processors or Cores......Page 806
41.5 Example 3: Using Dislin to Plot Gustafson's Law Graph 1 – 64 Processors or Cores......Page 808
41.6 Example 4: Using Dislin to Plot Tsunami Events......Page 810
41.7 Example 5: Using Dislin to Plot the Met Office Data......Page 817
41.9 Bibliography......Page 820
41.10 Problems......Page 821
42.2 Example 1: Abstract Interfaces and Procedure Pointers......Page 822
42.3 Problem......Page 825
Glossary......Page 826
Attribute Declarations & Specifications......Page 838
Compatibility......Page 840
D.1 Argument Type and Return Type......Page 845
D.4 Common Optional Arguments......Page 846
D.7 Miscellaneous Rules......Page 847
D.8 Intrinsic functions list......Page 848
D.9 Intrinsic Function Examples......Page 854
D.10 Fortran Intrinsics by Standard......Page 906
D.11 Standard Intrinsic Modules......Page 912
Text Extracts, english, latin & coded......Page 914
Formal Syntax......Page 916
G.1.2 Production......Page 920
G.2.2 Production......Page 921
G.3.1 Debug......Page 923
G.3.2 Production......Page 927
G.4.1 Debug......Page 929
G.4.2 Production......Page 932
G.5.2 Production......Page 933
Index......Page 936