Re: interface blocks



On 2005-08-27 14:55:29 -0300, "Lynn" <nospam@xxxxxxxxxx> said:

If you want the most thorough checking, you put your procedures in
modules. That doesn't have a very close C/C++ analogue. The closest I
can come is that the Fortran compiler auto-generates an equivalent of a
C header file, including function prototypes.

Can I put all 3500 subroutines (and functions) into one module ?

Sure. Except the resulting object code might cause indegestion for some compilers. At least one of the major vendors has (maybe it has been fixed but they have not publicized it if so!) a code relocation scheme suitable for folks who keep their subroutines below some huge size. The module looks like a single subroutine to them and suddenly huge is not very big any more. Their relocation dictionary overflowed at 32k entries or some such technical glitch.

You will have to watch the semantics of external functions.
The old good practice of declaring external functions will be asking
for things outside the module and will cause trouble. If you are
passing subroutine names the same issue arises.


Thanks, Lynn McGuire


.



Relevant Pages

  • Re: Global variables?
    ... I'll have one "::routine log public" in my common subroutine library and ~1000 smaller and less complex programs. ... Debug: Procedure expose c. ... This would also allow me to add debugging calls in external functions; ...
    (comp.lang.rexx)
  • Re: interface blocks
    ... The closest I can come is that the Fortran compiler auto-generates an equivalent of a C header file, ... The module looks like a single subroutine to them and suddenly huge is not very big any more. ... Broke the linker trying to link 3500 object files! ...
    (comp.lang.fortran)
  • Re: interface blocks
    ... Except the resulting object code might cause indegestion for ... > some compilers. ... > You will have to watch the semantics of external functions. ... > passing subroutine names the same issue arises. ...
    (comp.lang.fortran)