General service and utility procedures
The general service and utility procedures belong to the xlfutility module. To ensure that the functions are given the correct type and that naming conflicts are avoided, use these procedures in one of the following two ways:
- XL Fortran supplies
the XLFUTILITY module, which contains the interfaces
and data type definitions for these procedures (and the derived-type
definitions required for the dtime_, etime_, idate_,
and itime_ procedures). XL Fortran flags
arguments that are not compatible with the interface specification
in type, kind, and rank. These modules enable type checking of these
procedures at compile time rather than at link time. The argument
names in the module interface are taken from the examples defined
below. The following files are supplied for the xlfutility and xlfutility_extname modules:
File names File type Locations - xlfutility.f
- xlfutility_extname.f
source file - /opt/ibm/xlf/15.1.0/samples/modules
- xlfutility.mod
- xlfutility_extname.mod
module symbol file - /opt/ibm/xlf/15.1.0/include
You can use the precompiled module by adding a USE statement to your source file (see USE for details). As well, you can modify the module source file and recompile it to suit your needs. Use the xlfutility_extname files for procedures compiled with the -qextname option. The source file xlfutility_extname.f has no underscores following procedure names, while xlfutility.f includes underscores for some procedures names (as listed in this section).
If there are name conflicts (for example if the accessing subprogram has an entity with the same name as a module entity), use the ONLY clause or the renaming features of the USE statement. For example,USE XLFUTILITY, NULL1 => DTIME_, NULL2 => ETIME_ - Because these procedures are not intrinsic procedures:
- You must declare their type to avoid potential problems with implicit typing.
- When compiling with the -U option, you must code the names of these procedures in all lowercase to match the names in the XL Fortran libraries. We will show the names in lowercase here as a reminder.
To avoid conflicts with names in the libc library, some procedure names end with an underscore. When coding calls to these procedures, you can:- Instead of typing the underscore, use the -qextname compiler
option to add it to the end of each name:
This method is recommended for programs already written without the underscore following the routine name. The XL Fortran library contains additional entry points, such as fpgets_, so that calls to procedures that do not use trailing underscores still resolve with -qextname.xlf -qextname calls_flush.f - Depending on the way your program is structured and the particular
libraries and object files it uses, you may have difficulty using -qextname or -brename.
In this case, enter the underscores after the appropriate names in
the source file:
PRINT *, IRTC() ! No underscore in this name CALL FLUSH_(10) ! But there is one in this name
If your program calls the following procedures, there are restrictions on the common block and external procedure names that you can use:XLF-Provided Function Name Common Block or External Procedure Name You Cannot Use mclock times rand irand


