Intrinsic functions
HP Fortran supports most of the intrinsics that HP FORTRAN 77 ™offers, and more. In addition, most of these intrinsics are available in HP Fortran without having to activate them with compiler directives or
With the larger number of available intrinsics in HP Fortran, there is the risk of name collisions with
EXTERNALstatement can prevent such collisions. Also, many HP FORTRAN 77™ intrinsics accept additional (nonstandard) argument types; HP Fortran is more
If the program you are migrating from HP FORTRAN 77™to HP Fortran calls libU77 routines in the BSD 3f library, the names of some of those routines may clash with names of HP Fortran intrinsics. Table on page 229 lists the names of libU77routines and intrinsic procedures that are
the same. If your HP FORTRAN 77™program calls any of these libU77routines, you should declare the routine with theEXTERNAL statement to get the libU77 routine; otherwise, the compiler will attempt to select the corresponding intrinsic procedure. (The f90option that links in the library of libU77 routines is +U77.
Table 40 Conflicting intrinsics and libU77 routine names
FREE | IARGC | MALLOC |
|
|
|
GETARG | IDATE | SYSTEM |
|
|
|
GETENV | LOC | TIME |
|
|
|
See the HP Fortran Programmer's Reference for information about all of the HP Fortran intrinsics and the libU77 routines.
•When you compile a program with the HP Fortran compiler, using an f77 command line. If the command line contains an unsupported f77 option, f90 will flag the option with an error message.
Table
•When you execute a program that consists of a mix of object files that have been created by f77 and f90. The problem here is that, although the object files may have been successfully linked, they may not be compatible. If they were incompatible, the resulting executable could behave unexpectedly or produce wrong results. Migration problems caused by incompatible object files are unusual but more difficult to detect and are discussed in the next section.
Table 41 f77 options supported by f90
f77 option | f90 option | function |
|
|
|
+check=all | Perform runtime subscript checking | |
|
|
|
+gprof | Prepare for profiling with gprof | |
|
|
|
+save | Use static storage for locals instead of stack | |
|
|
|
+noshared | Mark linker output unshared | |
|
|
|
+shared | Mark linker output shared | |
|
|
|
+prof | Prepare for profiling with prof | |
|
|
|
Migration issues 137