Reserved Names
When writing programs accessing the MATH/LIBRARY, the user should choose FORTRAN names that do not conflict with names of IMSL subroutines, functions, or named common blocks, such as the workspace common block
WORKSP (see
Automatic Workspace Allocation). The user needs to be aware of two types of name conflicts that can arise. The first type of name conflict occurs when a name (technically a
symbolic name) is not uniquely defined within a program unit (either a main program or a subprogram). For example, such a name conflict exists when the name
RCURV is used to refer both to a type
REAL variable and to the IMSL subroutine
RCURV in a single program unit. Such errors are detected during compilation and are easy to correct. The second type of name conflict, which can be more serious, occurs when names of program units and named common blocks are not unique. For example, such a name conflict would be caused by the user defining a subroutine named
WORKSP and also referencing an MATH/LIBRARY subroutine that uses the named common block
WORKSP. Likewise, the user must not define a subprogram with the same name as a subprogram in the MATH/LIBRARY, that is referenced directly by the user’s program or is referenced indirectly by other MATH/LIBRARY subprograms.
The MATH/LIBRARY consists of many routines, some that are described in the User’s Manual and others that are not intended to be called by the user and, hence, that are not documented. If the choice of names were completely random over the set of valid FORTRAN names, and if a program uses only a small subset of the MATH/LIBRARY, the probability of name conflicts is very small. Since names are usually chosen to be mnemonic, however, the user may wish to take some precautions in choosing FORTRAN names.
Many IMSL names consist of a root name that may have a prefix to indicate the type of the routine. For example, the IMSL single precision subroutine for fitting a polynomial by least squares has the name RCURV, which is the root name, and the corresponding IMSL double precision routine has the name DRCURV. Associated with these two routines are R2URV and DR2URV. RCURV is listed in the Alphabetical Index of Routines, but DRCURV, R2URV, and DR2URV are not. The user of RCURV must consider both names RCURV and R2URV to be reserved; likewise, the user of DRCURV must consider both names DRCURV and DR2URV to be reserved. The root names of all routines and named common blocks that are used by the MATH/LIBRARY and that do not have a numeral in the second position of the root name are listed in the Alphabetical Index of Routines. Some of the routines in this Index (such as the “Level 2 BLAS”) are not intended to be called by the user and so are not documented.
The careful user can avoid any conflicts with IMSL names if the following rules are observed:
Do not choose a name that appears in the Alphabetical Summary of Routines in the
User's Manual, nor one of these names preceded by a
D,
S_,
D_,
C_, or
Z_.
Do not choose a name of three or more characters with a numeral in the second or third position.
These simplified rules include many combinations that are, in fact, allowable. However, if the user selects names that conform to these rules, no conflict will be encountered.
Published date: 03/19/2020
Last modified date: 03/19/2020