-qextern

Category

Portability and migration

@PROCESS

None.

Purpose

Allows user-written procedures to be called instead of XL Fortran intrinsics.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- -q--extern--=--names---------------------------------------><

Defaults

Not applicable.

Parameters

names
A list of procedure names separated by colons.

Usage

The procedure names are treated as if they appear in an EXTERNAL statement in each compilation unit being compiled. If any of your procedure names conflict with XL Fortran intrinsic procedures, use this option to call the procedures in the source code instead of the intrinsic ones.

Because of the many Fortran 90 and Fortran 95 intrinsic functions and subroutines, you might need to use this option even if you did not need it for FORTRAN 77 programs.

Examples

      SUBROUTINE GETENV(VAR)
         CHARACTER(10) VAR
         PRINT *,VAR
      END

      CALL GETENV('USER')
      END

Compiling this program with no options fails because the call to GETENV is actually calling the intrinsic subroutine, not the subroutine defined in the program. Compiling with -qextern=getenv allows the program to be compiled and run successfully.