Ratfor

From Just Solve the File Format Problem
Revision as of 23:09, 25 May 2019 by Effect2 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
File Format
Name Ratfor
Ontology
Extension(s) .ratfor, .r
Released 1974[1] or 1976[2]


Ratfor (Rational Fortran) is a programming language that is essentially a mix of C and FORTRAN. It "compiles" to the latter.

Contents

Extensions

Ratfor seems to have bene labled with the extensions ".ratfor"[3] and ".r"[4].

Example

This example was taken from the 1980 United States Geological Survey implementation of the Network-Day Tape format[3]. It has not been tested before inclusion here.

subroutine prbuf(idata)
#
# (A long documentation comment - stripped from the example in the Formats Wiki)
#
integer*2 idata(1) # DATA RECORD - INPUT
# SET TO HOLD 16000 BITS OF TAPE INPUT RECORD
#
  integer*2 i
  integer*2 j
  integer*2 ibuff(80)
#
  do i = 1,25 {
    call getlin(idata, i, ibuff)
    write(6, 10) (ibuff(j), j=1,80)
10    format(1x, 80a1)
 }
#
  return
#
end

Links

An Internet Archive full-text search for "Ratfor" produces many results.

References

  1. Wikipedia:Ratfor#History, uncited
  2. According to Wikipedia, the book Software tools, by Kernighan, Brian W and Plauger, P. J., 1976, Addison-Wesley; https://archive.org/details/softwaretools00kern; this listing goes on Wikipedia's word that the book actually descibes it, although it can presumably be verified by reading it
  3. 3.0 3.1 https://pubs.usgs.gov/of/1981/0666/report.pdf, page 42 (45 of PDF)
  4. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24357
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox