XL Fortran allows many of the same FORTRAN 77 extensions as other popular compilers, including:
The -qctyplss option lets you use character constant expressions in the same places that you use typeless constants. The -qintlog option lets you use integer expressions where you can use logicals, and vice versa.
Date and time routines, such as dtime, etime, and jdate, are accessible as Fortran subroutines.
A number of other popular routines from the libc library, such as flush, getenv, and system, are also accessible as Fortran subroutines.
For porting from machines with larger or smaller word sizes, the -qintsize option lets you specify the default size for integers and logicals. The -qrealsize option lets you specify the default size for reals and complex components.
If you have procedures with the same names as any XL Fortran intrinsic procedures, the program calls the intrinsic procedure. (This situation is more likely with the addition of the many new Fortran 90 and Fortran 95 intrinsic procedures.)
If you still want to call your procedure, add explicit interfaces or EXTERNAL statements for any procedures with conflicting names, or use the -qextern option when compiling.
XL Fortran provides settings through the -qfloat option that help make floating-point results consistent with those from other IEEE systems; this subject is discussed in Duplicating the Floating-Point Results of Other Systems.
XL Fortran supports a number of extensions to various language standards. Many of these extensions are so common that you need to keep in mind, when you port programs to other systems, that not all compilers have them. To find such extensions in your XL Fortran programs before beginning a porting effort, use the -qlanglvl option:
$ # -qnoobject stops the compiler after parsing all the source, $ # giving a fast way to check for errors. $ # Look for anything above the base F77 standard. $ xlf -qnoobject -qlanglvl=77std f77prog.f ... $ # Look for anything above the F90 standard. $ xlf90 -qnoobject -qlanglvl=90std use_in_2000.f ... $ # Look for anything above the F95 standard. $ xlf95 -qnoobject -qlanglvl=95std use_in_2000.f ... |
Related Information: | See -qlanglvl Option. |