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 Fortran machine model, and therefore cannot compile a few rarely used archaic statements. This is a trade-off between completeness and efficiency. Also, VIF requires keywords to be separated from variable names by whitespace, unlike Fortran. This improves the legibility of source code. Ignoring whitespace outside CHARACTER strings was a little-used feature, if used at all.

Even so, VIF builds a mathematical library including vintage packages that are still in use today such as BLAS, ARPACK (used in SciPy, Mathematica, GNU Octave and MATLAB), LAPACK, or ODRPACK (used in Python package SciPy). 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.

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.

Here you can download the current VIF source distribution. The linux manual page can be viewed here. Again, VIF is experimental. Perhaps you would prefer a production-quality compiler like GNU Fortran. If you would want a genuine vintage experience, you might use the classic FORTRAN H compiler on MVS or VM/CMS.

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 
 

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. 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. 340
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. 140
compiler emit.c Emit C object code. 211
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. 138
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. 207
compiler modules.c Compile BLOCK DATA, FUNCTION, PROGRAM and SUBROUTINE. 637
compiler parameter.c Compile PARAMETER. 74
compiler scan.c Fortran scanner. 766
compiler slice.c Compile array slices. 185
compiler statements.c Compile statements. 700
compiler table.c Symbol table routines. 337
compiler tidy.c Vintage Fortran tidying tool. 819
compiler transput.c Compile Fortran IO. 1122
compiler type.c Type routines. 362
compiler vif.c VIF driver. 668
compiler vif.h VIF include file. 890
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. 2483
runtime rts-slatec.c Runtime support for SLATEC subprograms. 704
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 box-behnken.f Box-Behnken design related subprograms. 172
runtime chemometrics.f Machine Learning subprograms for VIF. Needs LAPACK. 207
runtime doomsday.f Doomsday algorithm giving the day of the week for a date. 595
runtime fortran-iv.f FORTRAN IV library functions for VIF. 44
runtime statistics.f Statistical functions for VIF. 671
runtime vif-math.f Auxiliary math functions for VIF. 185
mathlib mathlib-arpack.c 82 subprograms from ARPACK 28891
mathlib mathlib-blas.c 148 subprograms from BLAS 19238
mathlib mathlib-blas-slatec.c 4 subprograms from BLAS-SLATEC 244
mathlib mathlib-eispack.c 82 subprograms from EISPACK 9449
mathlib mathlib-fftpack4.c 68 subprograms from FFTPACK4 3934
mathlib mathlib-fftpack5.c 220 subprograms from FFTPACK5 20544
mathlib mathlib-fishpack.c 19 subprograms from FISHPACK 4030
mathlib mathlib-fnlib.c 254 subprograms from FNLIB 81382
mathlib mathlib-lapack-arpack.c 144 subprograms from LAPACK-ARPACK 21216
mathlib mathlib-lapack-svd.c 85 subprograms from LAPACK-SVD 16516
mathlib mathlib-linpack.c 177 subprograms from LINPACK 21036
mathlib mathlib-minpack.c 23 subprograms from MINPACK 3021
mathlib mathlib-odepack.c 84 subprograms from ODEPACK 17223
mathlib mathlib-odrpack.c 63 subprograms from ODRPACK 14847
mathlib mathlib-pchip.c 41 subprograms from PCHIP 4180
mathlib mathlib-quadpack.c 73 subprograms from QUADPACK 15449
mathlib mathlib-slatec.c 391 subprograms from SLATEC 86020
mathlib mathlib-slatec-dassl.c 16 subprograms from SLATEC-DASSL 5815
mathlib mathlib-slatec-depac.c 8 subprograms from SLATEC-DEPAC 2271
mathlib mathlib-slatec-extended.c 22 subprograms from SLATEC-EXTENDED 3011
mathlib mathlib-slatec-harwell.c 10 subprograms from SLATEC-HARWELL 3270
mathlib mathlib-slatec-pppack.c 18 subprograms from SLATEC-PPPACK 951
mathlib mathlib-slatec-sdrive.c 36 subprograms from SLATEC-SDRIVE 10797
mathlib mathlib-toeplitz.c 19 subprograms from TOEPLITZ 960
Total 2087 subprograms 416677

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)