Search code examples
fortranfortran77abstract-data-type

Abstract Data Types in Fortran 77 (Fortran-II)?


I'm attempting to work in Fotran 77, and I've found the need for a tree based data structure. Aside from implementing a tree with an array, is there any way to build a tree with pointer nodes to other nodes, as per a standard implementation in most languages?

The documentation for this beast is scarce, and there doesn't appear to be any standard structure type that would make this possible.

Thoughts?


Solution

  • Without Cray pointers or other hackery, the only way to implement a "data type" is with parallel arrays, each of which represents a field. An index, then, can refer to an instantiation of the data type.