so much better than Fortran''
is the most common response of users
Although cynics might consider this to be vacuous,
it does seem to be true that
decent control flow and cosmetics converts Fortran
from a bad language into quite a reasonable one,
assuming that Fortran data structures are adequate
Although there are no quantitative results,
users feel that coding in
is at least twice as fast as in Fortran.
More important, debugging and subsequent revision
are much faster than in Fortran.
Partly this is simply because the code can be
which test at the top instead of the bottom
seem to eliminate or at least
reduce the occurrence of a wide class of
And of course it is easy to do structured programming in
this self-discipline also contributes
One interesting and encouraging fact is that
tend to be as readable as programs
written in more modern languages
Once one is freed from the shackles of Fortran's
clerical detail and rigid input format,
it is easy to write code that is readable, even esthetically pleasing.
implementation of the linear table search discussed by
for (i = 1; A(i) != x; i = i + 1)
A large corpus (5400 lines) of Ratfor, including a subset of
the Ratfor preprocessor itself,
The biggest single problem is that many Fortran syntax errors
but by the local Fortran compiler.
The compiler then prints a message
in terms of the generated Fortran,
and in a few cases this may be difficult
to relate back to the offending
especially if the implementation conceals the generated Fortran.
This problem could be dealt with
by tagging each generated line with some indication
of the source line that created it,
but this is inherently implementation-dependent,
so no action has yet been taken.
Error message interpretation
is actually not so arduous as might be thought.
Since Ratfor generates no variables,
data-related errors like missing
are easy to find in the Fortran.
Furthermore, there has been a steady improvement
in Ratfor's ability to catch trivial syntactic
errors like unbalanced parentheses and quotes.
There are a number of implementation weaknesses
that are a nuisance, especially to new users.
This rarely makes any difference, except for those hardy souls
who want to use an Arithmetic
constructions are not accepted by
and this is perceived as a problem by users with a large corpus
of existing Fortran programs.
Protecting every line with a `%' is not really a
complete solution, although it serves as a stop-gap.
The best long-term solution is provided by the program
which converts arbitrary Fortran programs into Ratfor.
Users who export programs often complain that the generated Fortran is
``unreadable'' because it is not
tastefully formatted and contains extraneous
To some extent this can be ameliorated
(Ratfor now has an option to copy Ratfor comments into
but it has always seemed that effort is better spent
on the input language than on the output esthetics.
One final problem is partly attributable to success _
since Ratfor is relatively easy to modify,
there are now several dialects of Ratfor.
Fortunately, so far most of the differences are in character set,
or in invisible aspects like code generation.