HP OpenVMS Systems Documentation

Content starts here

HP Fortran for OpenVMS
User Manual


Previous Contents Index


Appendix B
Compatibility: Compaq Fortran 77 and HP Fortran

This appendix describes:

B.1 HP Fortran and Compaq Fortran 77 Compatibility on Various Platforms

Table B-1 summarizes the compatibility of HP Fortran (HF, which supports the Fortran 95, 90, 77, and 66 standards) and Compaq Fortran 77 (CF77) on multiple platforms (architecture/operating system pairs).

HP Fortran is available on OpenVMS I64 systems, OpenVMS Alpha Systems, Tru64 UNIX Alpha systems, Linux Alpha systems, and as Compaq Visual Fortran (CVF) on Windows systems.

Table B-1 Summary of Language Compatibility
Language Feature HF UNIX Alpha HF Linux Alpha CVF Windows x86 HF OpenVMS I64 and Alpha CF77 OpenVMS Alpha CF77 OpenVMS VAX
Linking against static and shared libraries <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Create code for shared libraries <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Recursive code support <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
AUTOMATIC and STATIC statements <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
STRUCTURE and RECORD declarations <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
INTEGER*1, *2, *4 <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
LOGICAL*1, *2, *4 <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
INTEGER*8 and LOGICAL*8 <bullet symbol> <bullet symbol>   <bullet symbol> <bullet symbol>  
REAL*4, *8 <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
REAL*16 1 <bullet symbol> <bullet symbol>   <bullet symbol> <bullet symbol> <bullet symbol>
COMPLEX*8, *16 <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
COMPLEX*32 2 <bullet symbol> <bullet symbol>   <bullet symbol> <bullet symbol>  
POINTER (CRAY-style) <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
INCLUDE statements <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
IMPLICIT NONE statements <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Data initialization in type declarations <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Automatic arrays <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>  
VOLATILE statements <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
NAMELIST-directed I/O <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
31-character names including $ and _ <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Source listing with machine code <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Debug statements in source <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Bit constants to initialize data and use in arithmetic <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
DO WHILE and END DO statements <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Built-in functions %LOC, %REF, %VAL <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
SELECT CASE construct <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>  
EXIT and CYCLE statements <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>  
Variable FORMAT expressions (VFEs) <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
! marks end-of-line comment <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Optional run-time bounds checking for arrays and substrings <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Binary (unformatted) I/O in IEEE big endian, IEEE little endian, VAX, IBM, and CRAY floating-point formats <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
Fortran 90/95 standards checking <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
FORTRAN-77 standards checking         <bullet symbol> <bullet symbol>
IEEE exception handling <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>  
VAX floating data type in memory       <bullet symbol> <bullet symbol> <bullet symbol>
IEEE floating data type in memory <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>  
CDD/Repository DICTIONARY support       <bullet symbol> <bullet symbol> <bullet symbol>
KEYED access and INDEXED files       <bullet symbol> <bullet symbol> <bullet symbol>
Parallel decomposition <bullet symbol>         <bullet symbol>
OpenMP parallel directives <bullet symbol>          
Conditional compilation using IF...DEF constructs <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Vector code support           <bullet symbol>
Direct inlining of Basic Linear Algebra Subroutines (BLAS) 3   3 3 3 3 <bullet symbol>
DATE_AND_TIME returns 4-digit year <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>
FORALL statement and construct <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Automatic deallocation of ALLOCATABLE arrays <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Dim argument to MAXLOC and MINLOC <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
PURE user-defined subprograms <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
ELEMENTAL user-defined subprograms <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Pointer initialization (initial value) <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
The NULL intrinsic to nullify a pointer <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Derived-type structure initialization <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
CPU_TIME intrinsic subroutine <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Kind argument to CEILING and FLOOR intrinsics <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Nested WHERE constructs, masked ELSEWHERE statement, and named WHERE constructs <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Comments allowed in namelist input <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Generic identifier in END INTERFACE statements <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Minimal FORMAT edit descriptor field width <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    
Detection of obsolescent and/or deleted features 4 <bullet symbol> <bullet symbol> <bullet symbol> <bullet symbol>    

1For REAL*16 data, OpenVMS VAX systems use H_float format, and I64 and Alpha systems use IEEE style X_float format.
2For COMPLEX*32 data, I64 and Alpha systems use IEEE style X_float format for both REAL*16 parts.
3BLAS and other routines are available with the Compaq Extended Mathematical Library (CXML). See Chapter 15.
4HP Fortran flags these deleted and obsolescent features but fully supports them.

B.2 Major Language Features for Compatibility with Compaq Fortran 77 for OpenVMS Systems

To simplify porting Compaq Fortran 77 applications from OpenVMS VAX systems to HP Fortran on OpenVMS I64 or OpenVMS Alpha systems, the following features (extensions) are provided with HP Fortran:

  • HP Fortran provides LIB$ESTABLISH and LIB$REVERT as intrinsic functions for compatibility with Compaq Fortran 77 for OpenVMS VAX Systems condition handling; see Chapter 14.
  • HP Fortran provides FOR$RAB as an intrinsic function and it should not be declared as EXTERNAL; see Section 11.2.3.
  • FORSYSDEF parameter definitions for use with OpenVMS system services (see Appendix E).
  • The /VMS qualifier (the default) makes the run-time environment behave more like Compaq Fortran 77 for OpenVMS VAX Systems (see Section 2.3.50).
  • Compaq Fortran 77 extensions not part of the Fortran 90 standard that are supported as extensions by HP Fortran for OpenVMS Alpha Systems include the following:
    • Record structures (STRUCTURE and RECORD statements)
    • Indexed sequential files, relative files, and keyed access
    • USEROPEN routines for RMS control block access
    • I/O statements, including PRINT, ACCEPT, TYPE, DELETE, and UNLOCK
    • I/O statement specifiers, such as the INQUIRE statement specifiers CARRIAGECONTROL, CONVERT, ORGANIZATION, and RECORDTYPE
    • Certain data types, including 8-byte INTEGER and LOGICAL variables (available on Alpha systems) and 16-byte REAL variables. REAL (KIND=16) data is provided in Alpha X_float format (not VAX H_float format)
    • Size specifiers for data declaration statements, such as INTEGER*4, in addition to the KIND type parameter
    • The POINTER statement and its associated data type (CRAY pointers)
    • The typeless PARAMETER statement
    • The VOLATILE statement
    • The AUTOMATIC and STATIC statements
    • Built-in functions used in argument lists, such as %VAL and %LOC
    • Hollerith constants
    • Variable-format expressions
    • Certain intrinsic functions
    • The tab source form (resembles fixed-source form)
    • I/O formatting descriptors
    • Additional language features, including the DEFINE FILE, ENCODE, DECODE, and VIRTUAL statements

For More Information:

  • On the HP Fortran language, see the HP Fortran for OpenVMS Language Reference Manual.


Previous Next Contents Index