next up previous
Next: Variables Up: Scientific programming in C Previous: Scientific programming in C

Introduction

As we have already mentioned, C is a flexible, extremely powerful, high-level programming language which was initially designed for writing operating systems and system applications. In fact, all UNIX operating systems, as well as most UNIX applications (e.g., text editors, window managers, etc.) are written in C. However, C is also an excellent vehicle for scientific programming, since, almost by definition, a good scientific programming language must be powerful, flexible, and high-level. Having said this, many of the features of C which send computer scientists into raptures are not particularly relevant to the needs of the scientific programmer. Hence, in the following, we shall only describe that subset of the C language which is really necessary to write scientific programs. It may be objected that our cut-down version of C bears a suspicious resemblance to FORTRAN. However, this resemblance is hardly surprising. After all, FORTRAN is a high-level programming language which was specifically designed with scientific computing in mind.

As discussed previously, C++ is an extension of the C language whose main aim is to facilitate object-orientated programming. The object-orientated features of C++ are superfluous to our needs in this course. However, C++ incorporates some new, non-object-orientated features which are extremely useful to the scientific programmer. We shall briefly discuss these features towards the end of this section. Finally, we shall describe some prewritten C++ classes which allow us to incorporate complex arithmetic (which is not part of the C language), variable size arrays, and graphics into our programs.


next up previous
Next: Variables Up: Scientific programming in C Previous: Scientific programming in C
Richard Fitzpatrick 2006-03-29