VIntage Fortran (VIF) is my experimental 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 statements. This is a trade-off between completeness and efficiency.

Another experimental feature are multiple precision data types REAL*32 and COMPLEX*64. This should suffice for most 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.

Current version

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

VIF source code Source code archive
• For Linux and FreeBSD
November 2025
2.4MB
     
VIF manual page November 2025
     
VIF current source Browsable source code November 2025

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

Portability of types

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 
 

Cross referenced source code

Below is a list with the cross-referenced source files of the current VIF version.

VIF source files

File Synopsis Lines
compiler assign.c Compile assignments. 97
compiler autosave.c Compile SAVE. 183
compiler banner.c Banner for listing files. 169
compiler call.c Compile CALL and function calls. 175
compiler code.c Routines to emit C object code. 471
compiler coerce.c Type conversions for assignments and function statements. 229
compiler common.c Compile COMMON. 153
compiler data.c Compile DATA. 344
compiler decide.c Decide statement type. 81
compiler declarations.c Compile declarations. 271
compiler diag.c Diagnostic message routines. 93
compiler dimension.c Compile DIMENSION. 142
compiler emit.c Emit C object code. 236
compiler equivalence.c Compile EQUIVALENCE. 337
compiler expression.c Compile Fortran expressions. 611
compiler external.c Compile declarations. 72
compiler factor.c Compile Fortran expression factors. 363
compiler fold.c Constant folder. 562
compiler format.c Compile FORMAT. 456
compiler fpp.c Fortran preprocessor. 177
compiler goto.c Compile GOTO. 139
compiler implicit.c IMPLICIT declaration routines. 207
compiler intrinsic.c Compile inline intrinsic functions. 813
compiler jcl.c Rudimentary JCL handler 152
compiler macro.c Compile function statements. 212
compiler modules.c Compile BLOCK DATA, FUNCTION, PROGRAM and SUBROUTINE. 640
compiler parameter.c Compile PARAMETER. 77
compiler scan.c Fortran scanner. 766
compiler slice.c Compile array slices. 185
compiler statements.c Compile statements. 718
compiler table.c Symbol table routines. 342
compiler tidy.c Vintage Fortran tidying tool. 827
compiler transput.c Compile Fortran IO. 1346
compiler type.c Type routines. 362
compiler vif.c VIF driver. 691
compiler vif.h VIF include file. 907
runtime rts.c Runtime support. 339
runtime rts-char.c Runtime support for character - integer/real conversion. 117
runtime rts-format.c Runtime support for formatted IO. 830
runtime rts-jit.c Just-in-time compilation of FORMAT strings. 387
runtime rts-lapack.c Runtime support for LAPACK subprograms. 807
runtime rts-math.c Runtime support for math operations. 451
runtime rts-real16.c Runtime support for REAL*16 and COMPLEX*32. 127
runtime rts-real32.c Runtime support for REAL*32 and COMPLEX*64. 2482
runtime rts-slatec.c Runtime support for SLATEC subprograms. 704
runtime rts-transput.c Runtime support for Fortran IO. 358
runtime rts-wapr.c Runtime support implementing the Lambert W-function. 361
runtime rts-real32.h Runtime support for REAL*32 and COMPLEX*64. 320
runtime chemometrics.f Machine Learning subprograms for VIF. Needs LAPACK. 211
runtime fortran-iv.f FORTRAN IV library functions for VIF. 44
runtime vif-math.f Auxiliary math functions for VIF. 185
mathlib mathlib-arpack.c Subprograms from ARPACK 32400
mathlib mathlib-blas.c Subprograms from BLAS 24001
mathlib mathlib-blas-slatec.c Subprograms from BLAS-SLATEC 439
mathlib mathlib-burkardt.c Subprograms from BURKARDT 3682
mathlib mathlib-eispack.c Subprograms from EISPACK 11868
mathlib mathlib-fftpack4.c Subprograms from FFTPACK4 5856
mathlib mathlib-fftpack5.c Subprograms from FFTPACK5 26783
mathlib mathlib-fishpack.c Subprograms from FISHPACK 4731
mathlib mathlib-fnlib.c Subprograms from FNLIB 97753
mathlib mathlib-lapack-arpack.c Subprograms from LAPACK-ARPACK 26414
mathlib mathlib-lapack-svd.c Subprograms from LAPACK-SVD 19568
mathlib mathlib-linpack.c Subprograms from LINPACK 26211
mathlib mathlib-minpack.c Subprograms from MINPACK 3867
mathlib mathlib-odepack.c Subprograms from ODEPACK 20141
mathlib mathlib-odrpack.c Subprograms from ODRPACK 17284
mathlib mathlib-pchip.c Subprograms from PCHIP 5594
mathlib mathlib-quadpack.c Subprograms from QUADPACK 18962
mathlib mathlib-slatec.c Subprograms from SLATEC 102515
mathlib mathlib-slatec-dassl.c Subprograms from SLATEC-DASSL 6607
mathlib mathlib-slatec-depac.c Subprograms from SLATEC-DEPAC 2694
mathlib mathlib-slatec-extended.c Subprograms from SLATEC-EXTENDED 3754
mathlib mathlib-slatec-harwell.c Subprograms from SLATEC-HARWELL 3747
mathlib mathlib-slatec-pppack.c Subprograms from SLATEC-PPPACK 1517
mathlib mathlib-slatec-sdrive.c Subprograms from SLATEC-SDRIVE 12277
mathlib mathlib-toeplitz.c Subprograms from TOEPLITZ 1537
Total 0 subprograms 501531

Posts in "Computing history"

Marcel van der Veer Computing history
Snoopy calendar 1969-2025
January 2025

We make a Snoopy calendar from programmer's lore …


Marcel van der Veer Computing history
Fortran - lingua franca with a promising future behind it
March 2022

I wrote a simple compiler that translates most Fortran IV/66/77 source code …


Marcel van der Veer Computing history
VM/CMS and MVS/TSO reunited
October 2021

Virtualisation began half a century ago as a method of sharing mainframe resources between different operating systems, applications or users …


Marcel van der Veer Computing history
Algol68C on MVS revisited
August 2018

As the author of Algol 68 Genie I am interested in having access to other Algol 68 compilers for reference purposes …


Marcel van der Veer Computing history
Running Algol68C on MVS
October 2012

Recently, Algol68C Release 1.3039 was made public for download …




© 2002-2025 J.M. van der Veer (jmvdveer@xs4all.nl)