Reserved Names
When writing programs accessing IMSL MATH/LIBRARY Special Functions, 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
BSJS is used to refer both to a type
REAL variable and to the IMSL routine
BSJS 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 routine named
WORKSP and also referencing a MATH/LIBRARY Special Functions routine that uses the named common block
WORKSP. Likewise, the user must not define a subprogram with the same name as a subprogram in MATH/LIBRARY Special Functions, that is referenced directly by the user’s program or is referenced indirectly by other MATH/LIBRARY Special Functions subprograms.
MATH/LIBRARY Special Functions 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 MATH/LIBRARY Special Functions, 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 routine for computing Bessel functions of the first kind with real order has the name BSJS, which is the root name, and the corresponding IMSL double precision routine has the name DBSJS. Associated with these two routines are B2JS and DB2JS. BSJS is listed in the Alphabetical Index of Routines, but DBSJS, B2JS, and DB2JS are not. The user of BSJS must consider both names BSJS and B2JS to be reserved; likewise, the user of DBSJS must consider both names DBSJS and DB2JS to be reserved. The root names of all routines and named common blocks that are used by MATH/LIBRARY Special Functions 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 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.