Skip to main content
main-content

Über dieses Buch

i.l Overview for Instructors The purpose of this text is to provide an introduction to the problem-solving capabilities of Fortran 90. The intended audience is undergraduate science and engineering students who have not previously taken a formal programming course. The focus is on the process of solving computational problems of interest to scientists and engineers, rather than on programming per se, which has several important implications for the contents of the text, as outlined later in the Preface. Fortran has long been favored as an introductory programming language for engineering and science students because of its historical roots and continued prominence in the professional practice of these disciplines. The Fortran 77 standard has been taught, within an essentially mainframe context, to an entire generation of scientists and engineers. However, many of the science and engineering calculations that, a generation ago, could be done only on mainframe computers can now be done on desktop computers, often using applications that don't require any programming at all.

Inhaltsverzeichnis

Frontmatter

1. Computing Environments for Problem Solving

Abstract
This chapter offers a very brief history of electronic computing and an equally brief description of some of the features of computing environments you are likely to encounter during a course based on this text. It also includes a discussion of the role of Fortran and programming in the problem-solving process.
David R. Brooks

2. Solving Problems with a High-Level Programming Language

Abstract
This chapter presents a general approach to using computers to solve certain kinds of computational problems. It describes instructions and data types common to structured programming with high-level procedural languages and defines a specific strategy for developing algorithms that can easily be translated into a language such as Fortran. It includes a short Fortran program that you can copy and execute on the computer you will be using for a course based on this text.
David R. Brooks

3. Getting Started with Fortran: Writing Simple Programs

Abstract
This chapter describes some basic elements of the Fortran language and lays the foundation for every Fortran program you will write. It includes Fortran implementations of the ASSIGN, DEFINE, INCREMENT, INITIALIZE, READ, and WRITE pseudocode commands from Chapter 2. By the time you finish this chapter, you will be able to write simple Fortran programs that accept input from your computer keyboard, perform some calculations, and display output on your monitor.
David R. Brooks

4. Using Functions to Expand the Power of Fortran

Abstract
Much of the power of Fortran is due to its dozens of predefined functions for performing mathematical and other calculations. This chapter describes many of these functions and introduces one way to create your own functions.
David R. Brooks

5. Gaining Control over Program Output

Abstract
This chapter discusses techniques for supplementing the list-directed output formats used in the previous chapters with formats that provide a wide range of options for controlling the appearance of displayed output from your programs.
David R. Brooks

6. Program Control: Branching and Repetitive Calculations

Abstract
The chapter begins with a discussion of Fortran 90’s implementation of program control constructs, including the IFTHEN… and CHOOSE… pseudocode commands and the LOOPEND LOOP pseudocode command. Fortran implementation of the relational operators and the LOGICAL data type is discussed.
David R. Brooks

7. Program Modularization

Abstract
This chapter describes how to design modularized Fortran programs. It begins with a discussion of algorithms that use the CALL and SUBPROGRAM commands from the pseudocode language of Chapter 2. It then shows how to implement these algorithms using Fortran subroutine and function subprograms.
David R. Brooks

8. Using Arrays to Organize Information

Abstract
This chapter begins with a typical data collection problem to illustrate the utility of and Fortran syntax for defining and using arrays. Topics covered include one-dimensional and multidimensional arrays, arrays as parameters in functions and subroutines, allocatable arrays, strings as “arrays” of characters, user-defined record types, and arrays of records.
David R. Brooks

9. Using Formatted Sequential Access and Internal Files

Abstract
This chapter discusses the concept of a formatted text file and presents the syntax of the OPEN, READ, WRITE, and CLOSE statements required to access and create such files. The important scenario in which a READ statement appears in a conditional loop structure to control the reading of a data file of unknown length is discussed in detail. The syntax for writing formatted files is described. Internal files are presented as a way to store records in a temporary buffer for processing.
David R. Brooks

10. Some Essential Programming Algorithms

Abstract
This chapter deals with the Fortran implementation of some common algorithms from computer science that have many applications in science and engineering. These include algorithms for searching and sorting lists of data and algorithms for recursively defined functions. These algorithms are implemented as subroutines and functions in MODULES so that they can be incorporated into your own programs even if you don’t spend much time understanding the details of their operation.
David R. Brooks

11. Basic Statistics and Numerical Analysis with Fortran

Abstract
Statistical and numerical analysis are among the most important applications of Fortran. In this chapter, algorithms are presented for calculating basic descriptive statistics and some typical problems in numerical analysis, including differentiation and integration, solving systems of linear equations, finding roots of equations, and numerical solutions to differential equations. The code for many of the algorithms is incorporated into a MODULE that you can use in your own programs. Each of the sections includes a typical application and is independent of the other sections.
David R. Brooks

12. A Closer Look

Abstract
The purpose of this chapter is to provide some additional insight into various Fortran 90 features. Each section is self-contained. There are several complete programs, but in contrast to previous chapters, there are no applications or exercises.
David R. Brooks

Backmatter

Weitere Informationen