ABSTRACT

Up to now we have looked at data that may consist of a real or integer number, a complex number or a logical element. We have also looked at items of character data consisting of a string of characters. These have all been “scalar” objects, in the sense that a constant or the name of a variable refers to a single integer, or a single string of characters, and so on. It does not matter that a long string of characters will take up much more memory than a single logical datum: both are regarded as individual scalar data items. An “array”, on the other hand, is an ordered set of data items, all of the same type, that can be referred to collectively by a single name. Arrays are an invaluable feature of Fortran and in practice only the very simplest of problems are solved without recourse to them.