Table of Contents

Previous: -intrinsic

## Option: library

-library
    This switch is used when a number of subprograms are contained in a file, but not all of them are used by the application. Normally, ftnchek warns you if any subprograms are defined but never used. This switch will suppress these warnings. Default = no.

    This switch also controls which subprogram calls and COMMON block declarations are checked. If a file is read with the -library flag in effect, the subprogram calls and COMMON declarations contained in a routine in that file will be checked only if that routine is in the main program's call tree. On the other hand, if the -library switch is turned off, then ftnchek checks the calls of every routine by every other routine, regardless of whether those routines could ever actually be invoked at run time, and likewise all COMMON block declarations are compared for agreement.

    The difference between this switch and the -usage=no-ext-unused option for subprograms is that the latter suppresses only the warning about routines being declared but not used. The -library switch goes further and excludes unused routines processed while it is in effect from all cross-checking of arguments and COMMON block declarations as well.

    (If there is no main program anywhere in the set of files that ftnchek has read, so that there is no call tree, then ftnchek will look for any non-library routines that are not called by any other routine, and use these as substitutes for the main program in constructing the call tree and deciding what to check. If no such top-level non-library routines are found, then all inter-module calls and all COMMON declarations will be checked.)

    See also: -arguments, -calltree, -common, -extern, -usage.

  Next: -list