Re: RatFor



On 2005-11-29 02:08:12 -0400, "bowo" <Firdaus.Prabowo@xxxxxxxxx> said:

Hey, anyone could explain about RatFor (Rational Fortran)?? All obout
its minuses and pluses.. Will it be a widely used language for
computing?

Thanks

RatFor is a preprocessor for Fortran. Its historical importance is that it was one of several such at the time before the Fortran 77 standard came out. They offerred a variety of control structures and other features that were not in Fortran 66. RatFor and FLECS are the two that still show up now and then. JPL also had SFTran.

There was once a Unix tool called struct which would take spagetti
Fortran 66 and produce RatFor with more modern control structures.

RatFor, struct and Unix all came from the Bell Labs back in its
glory days.

RatFor was the language used for a pseudo-Unix toolset for a
number of mainframe operating systems in the 1970s. SoftTools
is the name that I recall with the initial effort at Berkeley.

The particulars of RatFor are that it provides a C like appearance
to code that is semantically Fortran. The major source of this
visual effect is the use of the open and close braces, i.e. { and },
for statement grouping. There are both the Fortran style DO loops,
for fixed iterations, and C style FOR loops, handy for link list
style iterations. The is the top checked WHILE and a bottom checked
REPEAT ... UNTIL. There is a very inobtrusive continuation convention
of continuing if the last operator would expect more as well as
a multiple statement per line using semicolons. The syntactic sugar
was <=, etc, back when the standard spelling was .LE. and such.
On a feature by feature basis much of this is now part of Fortran 90.

The SoftTools RatFor offerred both a macro capability and a conditional
compilation facility. The "stock" RatFors had only a limited definition
mechanism. The ability to INCLUDE was present before it was standardized
in Fortran. These were important portability tools.

The source for the RatFor processor is availalbe so there are custom
variants floating about. I am one of those guilty folks. My variant
allows me to use the square brackets as alternates to parenthesis
and my internal coding style is to always use square brackets for
subscripts and nowhere else. I have a matching pretty printer which
knows this convention. I also have an execution profiler which
instruments the code and gives exact line execution counts as well
as "timings" against a synthetic "clock" which ticks at the same
rate as the line counters, all with attention paid to where the
time is spent against the call nesting. There is also the regular
time measurement if one wants to use processor time, with overhead
issues, rather than the operations counts. (Don't ask about array
assignment as that is foobar at best!) This tool set came into
existance over time. It also served as a good test bed for parser
methods, just template matching, which I have used elsewhare. At
one point I upgraded my RatFor to understand Fortran 90.

RatFor was an intersting blip that had some success that can be
atrributed to the long delays in getting Fortran 77 out and widely
used. It is a curiosity any more and is only found is a few dark
musty corners.



.



Relevant Pages

  • Re: why still use C?
    ... >> Ratfor, and a few different versions of MORTRAN as Fortran ... >> possibly with the intention of converting C programmers to ... and Pascal style I/O processing over C ...
    (comp.lang.c)
  • Re: Starting to doubt fortran
    ... Fortran 90 remove the need for a preprocessor such as Ratfor. ... CYCLE and EXIT avoid GOTOs with ugly labels in Fortran representation of ratfor code, ... The original ratfor, by definition, didn't "really need" f77, other than to make the Fortran representation legible. ...
    (comp.lang.fortran)
  • Re: Starting to doubt fortran
    ... Fortran 90 remove the need for a preprocessor such as Ratfor. ... of F77 compilers. ...
    (comp.lang.fortran)
  • Re: How old is the average Fortran programmer?
    ... We all know that FORTRAN/Fortran is an 'old' language and i have ... Fortran programmers are becoming rare, ... I have the impression that not much 'younger ones' really get to ... Started with Ratfor in 1977 (QMC London thought that we would ...
    (comp.lang.fortran)
  • Re: new to Numerical Recipies
    ... >> But, lest anyone here has forgotten, Real Programmers don't use ... > and so now I write fortran 77 using idioms easily translated into C. ... memory allocation, structures, and a full set of control structures, ... They are not "needless frills" in either ...
    (comp.lang.fortran)