Going beyond Fortran, the first concept needed is that of a structure.
For example, in Fortran, if a single symbol could represent
the idea of
(n,(x(i), i=1,n)
then that symbol would denote something like a structure.
Another structure might be
(n1,n2, ((x(i1), i1=1,n1), i2=1,n2).
A numerical analyst thinking about solving the multivariate regression
might need to allocate several instances of the structure representing
.Clearly, the solver program written by the analyst
should work for all possible structures.
In Fortran the application programmer ends out allocating
the temporary arrays needed by the numerical analyst,
leading to long, error prone calling sequences.
In Fortran the work of the applications programmer
and the numerical analyst are typically brought together by subroutines.
C also uses subroutine libraries,
and additionally it makes heavy use of ``include files''
that define structures thus serving to better isolate
science from numerical analysis.
C++ extends the structure concept to a ``class,''
which is a structure containing subroutine pointers
and has elaborate provisions
for sharing and hiding data,
for defaulting and overriding functions.
C++ also uses include files to implement
a new method of merging
the work of the applications programmer
to the numerical analyst
called ``inheritance'' or ``derivation''
whose explanation is beyond the scope of this brief summary
but which should become clearer as you progress through this document.