<s>
Ratfor	B-Language
(	O
short	O
for	O
Rational	O
Fortran	B-Application
)	O
is	O
a	O
programming	O
language	O
implemented	O
as	O
a	O
preprocessor	B-General_Concept
for	O
Fortran	B-Application
66	O
.	O
</s>
<s>
It	O
provides	O
modern	B-Language
control	I-Language
structures	I-Language
,	O
unavailable	O
in	O
Fortran	B-Application
66	O
,	O
to	O
replace	O
GOTOs	O
and	O
statement	O
numbers	O
.	O
</s>
<s>
Ratfor	B-Language
provides	O
the	O
following	O
kinds	O
of	O
flow-control	O
statements	O
,	O
described	O
by	O
Kernighan	O
and	O
Plauger	O
as	O
"	O
shamelessly	O
stolen	O
from	O
the	O
language	O
C	B-Language
,	O
developed	O
for	O
the	O
UNIX	B-Application
operating	I-Application
system	I-Application
by	O
D.M.	O
</s>
<s>
The	O
version	O
of	O
Ratfor	B-Language
in	O
Software	O
Tools	O
is	O
written	O
in	O
Ratfor	B-Language
,	O
as	O
are	O
the	O
sample	O
programs	O
,	O
and	O
inasmuch	O
as	O
its	O
own	O
translation	O
to	O
Fortran	B-Application
is	O
available	O
,	O
it	O
can	O
be	O
ported	O
to	O
any	O
Fortran	B-Application
system	O
.	O
</s>
<s>
Ratfor	B-Language
source	O
code	O
file	O
names	O
end	O
in	O
.r	O
or	O
.rat	O
.	O
</s>
<s>
Ratfor	B-Language
was	O
designed	O
and	O
implemented	O
by	O
Brian	O
Kernighan	O
at	O
Bell	O
Telephone	O
Laboratories	O
in	O
1974	O
,	O
and	O
described	O
in	O
Software	O
—	O
Practice	O
&	O
Experience	O
in	O
1975	O
.	O
</s>
<s>
In	O
1977	O
,	O
at	O
Purdue	O
University	O
,	O
an	O
improved	O
version	O
of	O
the	O
Ratfor	B-Language
preprocessor	B-General_Concept
was	O
written	O
.	O
</s>
<s>
It	O
was	O
called	O
Mouse4	O
,	O
as	O
it	O
was	O
smaller	O
and	O
faster	O
than	O
Ratfor	B-Language
.	O
</s>
<s>
A	O
published	O
document	O
by	O
Dr.	O
Douglas	O
Comer	O
,	O
professor	O
at	O
Purdue	O
,	O
concluded	O
"	O
contrary	O
to	O
the	O
evidence	O
exhibited	O
by	O
the	O
designer	O
of	O
Ratfor	B-Language
,	O
sequential	O
search	O
is	O
often	O
inadequate	O
for	O
production	O
software	O
.	O
</s>
<s>
In	O
comparison	O
to	O
the	O
Ratfor	B-Language
preprocessor	B-General_Concept
on	O
a	O
program	O
of	O
3000	O
source	O
lines	O
running	O
on	O
a	O
CDC	O
6500	O
system	O
took	O
185.470	O
CPU	O
seconds	O
.	O
</s>
<s>
That	O
was	O
cut	O
by	O
50%	O
when	O
binary	O
search	O
was	O
used	O
in	O
the	O
Ratfor	B-Language
code	O
.	O
</s>
<s>
With	O
the	O
availability	O
of	O
Fortran	B-Application
77	O
,	O
a	O
successor	O
named	O
Ratfiv	O
(	O
Ratfor	B-Language
=	O
rat4	O
=>	O
rat5	O
=	O
Ratfiv	O
)	O
could	O
,	O
with	O
an	O
option	O
/f77	O
,	O
output	O
a	O
more	O
readable	O
Fortran	B-Application
77	O
code	O
:	O
</s>
<s>
Initial	O
Ratfor	B-Language
source	O
code	O
was	O
ported	O
to	O
C	B-Language
in	O
1985	O
and	O
improved	O
to	O
produce	O
Fortran	B-Application
77	O
code	O
too	O
.	O
</s>
<s>
Although	O
the	O
GNU	B-Application
C	I-Application
compiler	I-Application
had	O
the	O
ability	O
to	O
directly	O
compile	O
a	O
Ratfor	B-Language
file	O
(	O
.r	O
)	O
without	O
keeping	O
a	O
useless	O
intermediate	O
Fortran	B-Application
code	O
(	O
.f	O
)	O
(	O
gcc	B-Application
foo.r	O
)	O
,	O
this	O
functionality	O
was	O
lost	O
in	O
version	O
4	O
during	O
the	O
move	O
in	O
2005	O
from	O
f77	B-Application
to	O
GNU	B-Application
Fortran	I-Application
.	O
</s>
<s>
Source	O
packages	O
,	O
.deb	O
or	O
src.rpm	B-Application
package	I-Application
are	O
still	O
available	O
for	O
users	O
who	O
needs	O
to	O
compile	O
old	O
Ratfor	B-Language
software	O
on	O
any	O
operating	O
system	O
.	O
</s>
<s>
Ratfiv	O
is	O
an	O
enhanced	O
version	O
of	O
the	O
Ratfor	B-Language
programming	I-Language
language	I-Language
,	O
a	O
preprocessor	B-General_Concept
for	O
Fortran	B-Application
designed	O
to	O
give	O
it	O
C-like	O
capabilities	O
.	O
</s>
<s>
Fortran	B-Application
was	O
widely	O
used	O
for	O
scientific	O
programming	O
but	O
had	O
very	O
basic	O
control-flow	O
primitives	O
(	O
"	O
do	O
"	O
and	O
"	O
goto	B-Application
"	O
)	O
and	O
no	O
"	O
macro	O
"	O
facility	O
which	O
limited	O
its	O
expressiveness	O
.	O
</s>
<s>
The	O
name	O
of	O
the	O
language	O
is	O
a	O
pun	O
(	O
Ratfor	B-Language
(	O
RATional	O
FORtran	B-Application
)	O
->	O
"	O
Rat	O
Four	O
"	O
->	O
"	O
Rat	O
Five	O
"	O
->	O
RatFiv	O
)	O
.	O
</s>
<s>
It	O
is	O
based	O
on	O
the	O
original	O
Ratfor	B-Language
by	O
B	O
.	O
Kernighan	O
and	O
P	O
.	O
J	O
.	O
Plauger	O
,	O
with	O
rewrites	O
and	O
enhancements	O
by	O
David	O
Hanson	O
and	O
friends	O
(	O
U	O
.	O
of	O
Arizona	O
)	O
,	O
Joe	O
Sventek	O
and	O
Debbie	O
Scherrer	O
(	O
Lawrence	O
Berkeley	O
National	O
Laboratory	O
)	O
.	O
</s>
