VIntage Fortran (VIF) is my experimental compiler for vintage Fortran, that is, Fortran II-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. Also, unlike old Fortran, VIF has reserved words, facilitating syntax directed translation. This is a trade-off between completeness and efficiency.

Even so, VIF compiles most vintage code. I like to think that programmers always have been keen on coding in a legible and portable way, and avoided Fortran's idiosyncrasies.

Here you can download the current VIF source distribution. The linux manual page can be viewed here.

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 builds a library with (selected) FOSS subprograms from BLAS, LINPACK, SLATEC etcetera. These FOSS vintage library subprograms are not indexed here.

VIF C source files

File Synopsis Lines
assign.c Compile assignment statements. 204
autosave.c Compile storage classes, SAVE statement. 181
banner.c Banner for listing files. 169
call.c Compile subprogram calls. 168
code.c Routines to emit C object code. 461
common.c Compiler COMMON statements. 146
data.c Compile DATA statements. 336
decls.c Compile declarations. 310
diag.c Diagnostic message routines. 93
10  dimension.c Compile DIMENSION statements. 119
11  emit.c Emit C object code. 211
12  equivalence.c Compile EQUIVALENCE statements. 332
13  expr.c Compile Fortran expressions. 613
14  factor.c Compile Fortran expression factors. 326
15  fold.c Constant folder. 563
16  format.c Compile FORMAT statements. 444
17  fpp.c Fortran preprocessor. 174
18  goto.c Compile GOTO statements. 138
19  implicit.c IMPLICIT declaration routines. 186
20  intrinsic.c Compile intrinsic functions. 632
21  jcl.c Rudimentary JCL handler 153
22  macro.c Compile function statements. 183
23  modules.c Compile BLOCK DATA, FUNCTION, PROGRAM and SUBROUTINE. 608
24  parameter.c Compile PARAMETER statement. 75
25  renum.c Vintage Fortran statement renumbering tool. 650
26  rts.c Runtime support. 338
27  rts-char.c Runtime support for character - integer/real conversion. 48
28  rts-io.c Runtime support for Fortran IO. 1061
29  rts-jit.c Just-in-time compilation of FORMAT strings. 391
30  rts-lapack.c Runtime support for LAPACK subprograms. 805
31  rts-math.c Runtime support for math operations. 458
32  rts-real16.c Runtime support for REAL*16 and COMPLEX*32. 132
33  rts-real32.c Runtime support for REAL*32 and COMPLEX*64. 2436
34  rts-slatec.c Runtime support for SLATEC subprograms. 384
35  rts-wapr.c Runtime support implementing the W-function. 359
36  scan.c Fortran scanner. 734
37  slice.c Compile array slices. 187
38  statements.c Compile statements. 659
39  table.c Symbol table routines. 310
40  transput.c Compile Fortran IO. 951
41  type.c Type routines. 361
42  vif.c VIF driver. 676

VIF Fortran source files

File Synopsis Lines
fortran-ii.f FORTRAN II library functions for VIF. 47
fortran-iv.f FORTRAN IV intrinsic library functions for VIF. 455
ml.f Machine Learning subprograms for VIF. 211

VIF include files

File Synopsis Lines
rts-real32.h Runtime support for REAL*32 and COMPLEX*64. 321
vif.h VIF include file. 871

The number of source lines in this version is 18957.


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)