2020-2026

The Vintage Fortran project
Downloads
Portability of vintage Fortran source code
Comments, questions or bug reports
Cross referenced source code

VIntage Fortran (VIF) is my niche compiler for vintage Fortran, that is, Fortran 66/77. VIF is experimental in the sense that it does not emulate the archaic Fortran machine model, and therefore cannot compile a few rarely used, obsolete or non-portable statements. This is a trade-off between completeness and efficiency. Personally, I use VIF to run vintage simulation software.

VIF offers multiple precision data types REAL*16 and COMPLEX*32, which was not uncommon at the time. A useful feature of VIF is the implementation of data types REAL*32 and COMPLEX*64. This should suffice for many multi-precision applications, typically requiring twenty up to sixty digits. VIF is probably the only vintage Fortran implementation offering these types.

Also, VIF requires keywords to be separated from variable names by whitespace, unlike Fortran. Spaces within names have no meaning, however. Ignoring whitespace outside CHARACTER strings was a little-used feature in vintage Fortran, if used at all.

VIF builds a mathematical library including vintage packages such as BLAS, ARPACK, LAPACK, or ODRPACK. These high-quality packages are used today in for example SciPy, Mathematica, GNU Octave and MATLAB. This legacy code adheres to the by-then Fortran standard and recommended coding practice. I like to think that people tended to avoid Fortran's idiosyncrasies as to write portable code.


Downloads

Below you can download the current source distribution. Again, VIF is an experimental niche compiler. Perhaps you would prefer a production-quality compiler like GNU Fortran.

VIF source code • Source code archive repository
• For Linux or FreeBSD
• 2.4MB
   
VIF manual page
   
VIF current source • Browsable source code

If you would want a genuine vintage experience, you might use the classic FORTRAN H compiler on MVS or VM/CMS.


Portability of vintage Fortran source code

A caveat when compiling vintage code is that in the old days, different machines had different representations of types. A REAL value could occupy a 32-bit, 36-bit or 64-bit word, depending on the hardware. Hence if you would compile code for a CRAY-1, investigate whether you should convert REAL to DOUBLE PRECISION. Portable programs from the time call routines like D1MACH for details of a type representation. Next trivial snippet x1mach.f prints machine parameters for REAL*32 analogous to the D1MACH function:

 
      REAL*32 x1mach 
      DO k = 1, 5 
         print *, k, x1mach(k) 
      END DO 
      END 
 

VIF can immediately execute a program upon successful compilation, like WATFOR or WATFIV, or a JCL CLG-type procedure under MVS or z/OS. We can execute above snippet with VIF like so, specifying -g:

 
 $ vif -g x1mach.f 
 ** main       ** end of compilation 1 
 ** linker     ** object size 372280 bytes 
 ** statistics ** 1 subprogram, no errors, no warnings 
 ** execution  ** 
 1  3.3621031431120935062626778173217526025980793448464712401088272298088533e-4932 
 2  1.1897314953572317650857593266280071307634446870965102374726748212332616e+4932 
 3  1.1319598848533390459386399113609739725853163997673922736978268612419382e-0072 
 4  2.2639197697066780918772798227219479451706327995347845473956537224838764e-0072 
 5  3.0102999566398119521373889472449302676818988146210854131042746112710819e-0001 

Comments, questions or bug reports

Please send comments, questions or bug reports to jmvdveer@algol68genie.nl; your feedback will be appreciated.


Cross referenced source code

Cross-referenced source files of the current VIF version are available here.


Projects
Computer history
Vintage Fortran
 


This website is archived by the National Library of the Netherlands.

© J.M. van der Veer   •   jmvdveer@algol68genie.nl