Понадобилось реанимировать старый фортрановский код, первая версия которого была сделана в 1989 и работала на ЕC ЭВМ, ФОРТРАН 77, более десятка тысяч строк кода.
На удивление быстро вспомнил и уравнения, и логику решения на бумаге, и логику программы. Всё откомпилировалось и запустилось. Более сложные вещи чем тогда я больше не писал.
Помню что проблемой было динамическое выделение памяти. Цитаты ниже описание того как мы работали.
-----------------------------------
some Fortran programmers are still clinging to F77, maybe because they don't like object orientation, namespaces and stuff, and are used to the old syntax.
I understand that you can write a program without OOP. What I don't understand is how you can do without dynamic memory management.
Often, horrible games were played with COMMON blocks and EQUIVALENCE statements to work around the lack of dynamic A COMMON block was implemented as a contiguous block of memory so by redefining the variables in the block, one could roll your own dynamic memory pool. EQUIVALENCE statements were an expedient replacement for pointers. The end result was typically a finely tuned morass of unmaintainable vandalism that can only be rivaled by the average C application ;)
In a large F77 program I know, it uses C malloc() to allocate a large chunk of memory first (according to the user request from an input file at the startup), then the program uses a stack-like mechanism to access part of that memory. This stack-like access is facilitated by using a common block having only a length-1 array (e.g., common /MEM/ X(1)) and let the subroutine know the offset from the address of X(1) and the (first element of) C-allocated memory, plus the necessary amount requested by each routine. So it is quite awkward but still used in that code as the main memory mechanism :)
https://stackoverflow.com/questions/40631055/how-do-fortran-77-programmers-manage-without-dynamic-memory-allocation