VIntage Fortran (VIF) is my experimental compiler for vintage Fortran, that is, Fortran IV-77. VIF is experimental in the sense that it does not emulate the Fortran machine model, and therefore cannot compile a few rarely used archaic statements. This is a trade-off between completeness and efficiency. Also, VIF has reserved words unlike Fortran, facilitating straightforward translation.

Even so, VIF compiles most vintage code, when that code adheres to the by-then Fortran standard. I like to think that most people avoid Fortran's idiosyncrasies to write portable code.

Here you can download the current VIF source distribution. The linux manual page can be viewed here. VIF builds a mathematical library including packages that are still in use today such as BLAS, ARPACK (used in SciPy, Mathematica, GNU Octave and MATLAB), ODRPACK (used in SciPy), etcetera.

A goal for VIF was to make available multiple precision data types REAL*32 and COMPLEX*64, considering that most multi-precision applications require twenty up to sixty digits. VIF is probably the only vintage Fortran implementation offering these 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. 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 
 

Below is a list with the cross-referenced source files of the current 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. 174
compiler code.c Routines to emit C object code. 466
compiler coerce.c Type conversions for assignments and function statements. 229
compiler common.c Compile COMMON. 153
compiler data.c Compile DATA. 338
compiler decls.c Compile declarations. 271
compiler diag.c Diagnostic message routines. 93
compiler dimension.c Compile DIMENSION. 136
compiler emit.c Emit C object code. 211
compiler equivalence.c Compile EQUIVALENCE. 333
compiler expression.c Compile Fortran expressions. 611
compiler external.c Compile declarations. 63
compiler factor.c Compile Fortran expression factors. 364
compiler fold.c Constant folder. 562
compiler format.c Compile FORMAT. 456
compiler fpp.c Fortran preprocessor. 173
compiler goto.c Compile GOTO. 138
compiler implicit.c IMPLICIT declaration routines. 187
compiler intrinsic.c Compile inline intrinsic functions. 788
compiler jcl.c Rudimentary JCL handler 152
compiler macro.c Compile function statements. 215
compiler modules.c Compile BLOCK DATA, FUNCTION, PROGRAM and SUBROUTINE. 606
compiler parameter.c Compile PARAMETER. 74
compiler renum.c Vintage Fortran statement renumbering tool. 647
compiler scan.c Fortran scanner. 764
compiler slice.c Compile array slices. 185
compiler statements.c Compile statements. 683
compiler table.c Symbol table routines. 337
compiler transput.c Compile Fortran IO. 1111
compiler type.c Type routines. 360
compiler vif.c VIF driver. 671
compiler vif.h VIF include file. 860
runtime rts.c Runtime support. 334
runtime rts-char.c Runtime support for character - integer/real conversion. 117
runtime rts-format.c Runtime support for formatted IO. 816
runtime rts-io.c Runtime support for Fortran IO. 341
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. 2468
runtime rts-slatec.c Runtime support for SLATEC subprograms. 573
runtime rts-wapr.c Runtime support implementing the W-function. 359
runtime rts-real32.h Runtime support for REAL*32 and COMPLEX*64. 320
runtime fortran-iv.f FORTRAN IV library functions for VIF. 44
runtime vif-math.f Auxiliary math functions for VIF. 185
runtime vif-ml.f Machine Learning subprograms for VIF. Needs LAPACK. 207
mathlib mathlib-arpack.c 82 subprograms from ARPACK 29028
mathlib mathlib-blas.c 148 subprograms from BLAS 18491
mathlib mathlib-eispack.c 82 subprograms from EISPACK 9778
mathlib mathlib-fftpack.c 68 subprograms from FFTPACK 4316
mathlib mathlib-fishpack.c 19 subprograms from FISHPACK 4578
mathlib mathlib-fnlib.c 268 subprograms from FNLIB 87492
mathlib mathlib-lapack-arpack.c 161 subprograms from LAPACK-ARPACK 23111
mathlib mathlib-lapack-svd.c 85 subprograms from LAPACK-SVD 16466
mathlib mathlib-linpack.c 177 subprograms from LINPACK 23398
mathlib mathlib-minpack.c 23 subprograms from MINPACK 3076
mathlib mathlib-odepack.c 85 subprograms from ODEPACK 17805
mathlib mathlib-odrpack.c 63 subprograms from ODRPACK 14833
mathlib mathlib-pchip.c 41 subprograms from PCHIP 4251
mathlib mathlib-quadpack.c 73 subprograms from QUADPACK 15695
mathlib mathlib-slatec.c 538 subprograms from SLATEC 111724
mathlib mathlib-slatec-dassl.c 10 subprograms from SLATEC-DASSL 5760
mathlib mathlib-slatec-extended.c 22 subprograms from SLATEC-EXTENDED 3096
mathlib mathlib-slatec-sdrive.c 24 subprograms from SLATEC-SDRIVE 10126
mathlib mathlib-toeplitz.c 19 subprograms from TOEPLITZ 1002
Total 424422

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)