Cpp (C preprocessor) tricks

While looking at the code of daskr, I just came across the *DECK instruction, which after a bit of research led me to preFOR.
It seems that each Fortran era had its flock of pre-processors.

A colleague once pointed me to Trefor: TREFOR. The sources of TREFOR can be found here: OpenStella/trefor at main · sblinnikov/OpenStella · GitHub

The *DECK directive is from the CDC (Control Data Corporation) UPDATE and MODIFY source code control programs. They implemented a “program library” system where you had a file containing multiple decks, common decks (which could be included into decks via the*CALL directive), modification decks to those decks, branches, etc. It was quite powerful for its day.

There was actually an early predecessor to them in the CDC world called COSY. And the decks were called “COSY decks”… The CDC SCOPE system introduced UPDATE, and many of CDCs products were maintained in UPDATE PLs. In the later KRONOS and NOS systems, CDC came up with the similar, but different, MODIFY utility.

Cray Research had its own version of UPDATE because, like many other pieces of Cray software, they were written by former CDC employees who re-wrote what they knew. If I recall correctly, CRI’s version of UPDATE was written in Fortran - whereas the CDC utilities were written in assembly language (COMPASS). It even made its way into unicos - Cray’s version of unix.

You can think of UPDATE and MODIFY as the great-grandparents of todays cvs/svn/git - but in batch processing days:

1 Like