Most programmers will agree that Fortran is
an unpleasant language to program in,
yet there are many occasions when they are forced to use it.
For example, Fortran is often the only language
thoroughly supported on the local computer.
Indeed, it is the closest thing to a universal programming language
with care it is possible to write large, truly portable
Finally, Fortran is often the most ``efficient'' language
available, particularly for programs requiring much computation.
Perhaps the worst deficiency is in
_ conditional branches and loops _
which express the logic of the program.
The conditional statements in Fortran are primitive.
forces the user into at least two statement numbers and
it leads to unintelligible code, and is eschewed by good programmers.
is better, in that the test part can be stated clearly,
but hopelessly restrictive because the statement
can only be one Fortran statement
And of course there can be no
there is no way to specify an alternative action if the
restricts the user to going forward in an arithmetic progression.
It is fine for ``1 to N in steps of 1 (or 2 or ...)'',
but there is no direct way to go backwards,
or even (in ANSI Fortran[2]) to go from 1 to
is useless if one's problem doesn't map into an arithmetic progression.
The result of these failings is that Fortran programs
must be written with numerous labels and branches.
particularly difficult to read and understand,
and thus hard to debug and modify.
When one is faced with an unpleasant language,
a useful technique is to define
a new language that overcomes the deficiencies,
and to translate it into the unpleasant one
This is the approach taken with
(The preprocessor idea is of course not new,
and preprocessors for Fortran are especially popular
A recent listing [3] of preprocessors
shows more than 50, of which at least half a dozen are widely available.)