Table 45 Nonstandard intrinsic procedures in HP Fortran (continued)
ATANH | FSET | INT4 | OR | SYSTEM |
|
|
|
|
|
BADDRESS | FSTREAM | INT8 | QCOTAN | TAND |
|
|
|
|
|
COSD | GETARG | INUM | QCOTAND | TIME |
|
|
|
|
|
COTAN | GETENV | IOMSG | QEXT | XOR |
|
|
|
|
|
COTAND | GRAN | IQINT | QFLOAT | ZEXT |
|
|
|
|
|
DATE | HFIX | IRAND | QNUM |
|
|
|
|
|
|
DCMPLX | IACHAR | IRANP | QPROD |
|
|
|
|
|
|
DCOTAN | IADDR | ISIGN | RAN |
|
HP Fortran also provides nonstandard specific intrinsics that derive from standard generic intrinsics; these nonstandard specific intrinsics are not listed in Table
Using porting options
HP Fortran provides a number of
In addition, HP Fortran includes options that provide compatibility by changing the compiler’s assumptions about the program or by causing the compiler to generate code that executes compatibly with the original implementation. The advantage of using options when porting is that they minimize having to edit and modify source code.
The following sections describe how options can help when porting programs that contain:
•Initialized variables
•Data types that are larger than the default sizes of HP Fortran data types
•Names that clash with
•Names that end in the underscore character (_)
•
•Different formats
•Escape sequences
Uninitialized variables
As noted in “Automatic and static variables” (page 67), the default behavior of HP Fortran is to allocate storage for program variables from the stack. However, older implementations of Fortran often allocate static storage for variables. One of the differences between stack storage and static storage is that static variables are initialized to 0s by the compiler, whereas automatic variables (variables allocated from the stack) must be explicitly initialized by the programmer.
Programs written for implementations of Fortran that allocate static storage by default sometimes rely on the compiler to initialize variables. Compiling and executing such programs on implementations that allocate stack storage can have disastrous results. To make HP Fortran
144 Porting to HP Fortran