FORTRAN 90 for Scientists and Engineers
eBook - ePub

FORTRAN 90 for Scientists and Engineers

  1. 368 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

FORTRAN 90 for Scientists and Engineers

About this book

The introduction of the Fortran 90 standard is the first significant change in the Fortran language in over 20 years. this book is designed for anyone wanting to learn Fortran for the first time or or a programmer who needs to upgrade from Fortran 77 to Fortran 90.Employing a practical, problem-based approach this book provides a comprehensive introduction to the language. More experienced programmers will find it a useful update to the new standard and will benefit from the emphasis on science and engineering applications.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access FORTRAN 90 for Scientists and Engineers by Brian H. Hahn,Brian Hahn in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Languages. We have over one million books available in our catalogue for you to explore.
1

Getting Going

1.1 Introduction
1.2 Fortran
1.3 Running Fortran Programs
• Greetings
• AIDS cases
• Compound interest
Summary
Exercises

1.1 Introduction

In the period since I first became an undergraduate student, some 25 years ago, I have been fortunate enough to witness the remarkable revolution in computer technology which future historians will surely regard as one of the outstanding features of the twentieth century. The first computer I programmed occupied a large room. Only one person could use it at a time, by pressing an impressive array of switches, and programs had to be punched on cards. Its ā€œfastā€ memory could store about 240 numbers. Its slow memory could hold a few thousand numbers, and was located on a rotating drum which you could hear ticking as it spun.
As technology advanced, and computers became more powerful, they also became much smaller. From occupying a whole room, they now only require part of a desk, a lap, or even a palm. They have banded together to form networks, and during an average working day, it is not uncommon to send electronic mail messages around the world, and to connect directly to a computer on the other side of the world.
You may not have used a computer before (except possibly to play games) but you are probably familiar with using a calculator. The simplest sort can only do arithmetic and display an answer. Smarter ones have memory locations—where intermediate results may be stored—and function keys such as sin, log, etc. The most sophisticated calculators allow you to store the sequence of operations (instructions) needed to calculate the solution of the problem. This sequence of instructions is called a program. To carry out the entire set of calculations you only need to load the program into the calculator, press the run key, supply the necessary data, and sit back while the calculator churns out the answer. A computer, whether it is a small personal one like the IBM PC, or a large impersonal mainframe, is in principle only an advanced programmable calculator, capable of storing and executing sets of instructions, called programs, in order to solve specific problems.
You may have used a computer before, but only to run software packages that have been written by someone else. Spreadsheets, databases and word processors fall into this category. If you have taken the trouble to start reading this book, you probably have an interest in science or engineering, and are curious enough about programming to want to write your own programs to solve your particular problems, instead of relying on someone else’s more general package.

1.2 Fortran

The particular set of rules for coding the instructions to a computer is called a programming language. There are many such languages, for example Fortran, BASIC, Pascal and C++. Fortran, which stands for FORmula TRANslation, was the first ā€œhigh levelā€ programming language. It made it possible to use symbolic names to represent mathematical quantities, and to write mathematical formulae in a reasonably comprehensible form, such as X = B/(2*A) The idea of Fortran was proposed in late 1953 by John Backus, in New York, and the first Fortran program was run in April 1957.
The use of Fortran spread so rapidly that it soon became necessary to standardize it, so that a program written in the standard would be guaranteed to run at any installation which claimed to support the standard. In 1966 the first ever standard for a programming language was published. This version became known as Fortran 66 (more correctly FORTRAN 66, but the practice of capitalizing acronyms is becoming unfashionable). A new standard, Fortran 77, was published in 1978. In spite of competition from newer languages such as Pascal and C, Fortran continued to flourish, so much so that the latest standard, Fortran 90, came out in August 1991. This is the version used in this book. Connoisseurs of Fortran will be interested in the history of the language sketched by Michael Metcalf and John Reid in Fortran 90 Explained, Oxford University Press (Oxford, 1990).
If you are already experienced in Fortran, you might like to consult the Preface, which indicates where the new features may be found. You will also need to know that some old features have been declared obsolescent. These (which may include some of your old favourites) have been made redundant by the new standard, and are recommended for deletion in the next stan...

Table of contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Copyright
  5. Preface
  6. Preface to Problem Solving with FORTRAN 77
  7. Chapter 1: Getting Going
  8. Chapter 2: Elementary Fortran: I
  9. Chapter 3: Elementary Fortran: II
  10. Chapter 4: Program Preparation
  11. Chapter 5: Decisions
  12. Chapter 6: Loops
  13. Chapter 7: Errors
  14. Chapter 8: Subprograms and Modules
  15. Chapter 9: Arrays
  16. Chapter 10: Advanced Input and Output
  17. Chapter 11: Handling Characters
  18. Chapter 12: Derived Types: Structures
  19. Chapter 13: Pointer Variables
  20. Chapter 14: Simulation
  21. Chapter 15: Matrices and Their Applications
  22. Chapter 16: Introduction to Numerical Methods
  23. Epilogue
  24. Appendix A: Order of Statements in a Program Unit
  25. Appendix B: Summary of Fortran 90 Statements
  26. Appendix C: Intrinsic Procedures
  27. Appendix D: ASCII Character Codes
  28. Appendix E: Solutions to Selected Exercises
  29. Index