Previous Table of Contents Next

Although spreadsheets are usually not considered to be programming languages, they can be used very conveniently for many of the calculations that otherwise would have to be done in some programming language whether conventional or ortherwise.
The accompanying image shows the sample problem as done on the MS Works spreadsheet with the cell for the maximum price highlighted. One of my first introductions to spreadsheets was in the first contribution which
Brian Hayes
wrote for the "Computer Recreations" column of *Scientific American* in 1983. Rereading the column recently was as great a pleasure as reading it when it first appeared. I quote here only the following two sentences from this excellent paper:

It is surprising how much of the mathematical structure of the world can be coaxed into such a format. Indeed, it turns out that the spreadsheet represents a quite general context for describing mathematical and logical relations.A wealth of useful features has been incorporated into spreadsheets since the first ones were developed, but the fundamental principles are very simple and are clearly stated in this paper.

Another language I might mention is
MATLAB
which is used extensively for engineering and scientific calculations. Although it may be classed as an array language - the name is an acronym for "Matrix Laboratory" - its array-handling capabilities are quite primitive when compared with the array languages of the last section. However, it is marketed widely, the documentation is excellent and attractively produced, the implementation makes it a pleasure to use, and the graphics facilities are superb. A MATLAB program for the sample program is shown here.

**
function r = summary(p)
%
%SUMMARY Tally, sum, maximum
% of the elements in a vector
%
r = [length(p),sum(p),max(p)];
**
MATLAB

Previous Table of Contents Next