[TUHS] C entry keyword
paul.winalski at gmail.com
Wed Oct 31 03:53:26 AEST 2018
In Fortran secondary entry points served two main purposes. It
allowed for sharing of code for similar routines (as in Angelo
Papenhoff's C example), which was important when your program had to
fit in only a few K of memory. Secondly, it provided partial relief
for Fortran's very restrictive variable-scoping rules.
It's a pain in the butt for compiler optimizers, although certain
modern interprocedural optimizations emit code that is the moral
equivalent of a routine with multiple entry points.
More information about the TUHS