Jump to content
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

Transition Impacts

HP-UX Software Transition Kit
» 

DSPP Home

» HP STK home
HP-UX STK
» Home
» Overview
» Tools
» Documentation
» Transition impacts
» Identifier types
» Impact list
» Qualifying on HP-UX
» Porting to HP-UX
» FAQ
» Glossary
» Help
» Send us feedback
Site maps
» HP-UX STK
» DSPP
Content starts here

hp Fortran compiler migration impacts summary

 

HP Fortran Migration Compiler Impacts Summary

HP Fortran 77 has been discontinued, and is no longer available. If you have not migrated your Fortran software off HP Fortran77, you should start planning to make this migration immediately. HP Fortran is available on HP-UX 11.0/11i on PA platforms, and on HP-UX 11i on IPF. HP Fortran is based on the Fortran95 standard, and supports 64-bit executables.

HP Fortran is generally compatible with the older standards-conforming HP Fortran 77. Source files and object files from existing HP Fortran 77 applications can be compiled and linked by HP Fortran with comparatively little effort. However, some compile-line options and non-standard extensions in HP Fortran 77 programs may require modification.

If you are using Ratfor, you can use the Ratfor preprocessor to convert your Ratfor source files to Fortran and then port to HP Fortran.

HP Fortran includes a number of extensions that are compatible with HP Fortran 77 and with other vendors' Fortran dialects. For a list of all HP Fortran extensions, see the HP Fortran 90 Programmer's Reference, Appendix A.

Although HP Fortran and HP Fortran 77 are generally compatible, a few areas may cause transition impacts in your source code:

  • Object file incompatibility: If you used the LOGICAL directive or Convex fc compile objects, you must recompile your source code.
  • Source incompatibilities: Changes in specifiers, statements, and directives may cause impacts in your source code. Many non-standard Fortran 77 compiler directives are not supported in HP Fortran. For example, this incompatible ACCESS specifier for OPEN:
    OPEN(40, ACCESS='append', ...)
    

    must be changed to:

  • OPEN(40, POSITION='append', ...) 
    
  • Command incompatibilities: Option and function changes may cause impacts in your code. For example, you must now use +dlines instead of the -D space option.
  • Syntax: HP Fortran has more restrictive syntax, and does not allow constructs that were legal in Fortran 77. For example, in Fortran 77, placeholder commas are allowed:
    write (3, 10), x
    

In HP Fortran, they are not allowed:

write (3, 10) x

HP Fortran also provides new features such as:

  • Free format code, as well as the fixed format of Fortran 77
  • Full array language, including array expressions and operations, array intrinsics, and array valued functions
  • New pointer syntax
  • Support for memory allocation and deallocation
  • Modular definitions
  • Derived types
  • Nested procedures
  • User-defined operations and operator overloading
  • Interfaces, with ability to specify full interface to a procedure
  • New control statements: CASE, CYCLE, EXIT, DO FOREVER
  • Named IF and DO statements
  • Non-advancing I/O
  • New type declaration syntax
  • WHERE statement
  • fid (Fortran Incompatibility Detector)
  • Use of >,<,>=,<=,==, /=

Note: To include only HP Fortran compiler migration impacts when running the scansummary and scandetail tools, use the option:
  +C F90
To exclude these impacts, use the option:
  -C F90
For more information on filtering output in reports, see Customizing Your Scan.

 

For more information

 
»  List of Fortran Impacts
arrow »  HP Fortran 90 Programmer's Reference
arrow »  HP Fortran 90 1.2 Release Notes
arrow »  HP Fortran 90 1.2 Release Notes for HP-UX 11.00
arrow »  HP Fortran home page
Printable version
Privacy statement Using this site means you accept its terms Feedback to DSPP
© 2007 Hewlett-Packard Development Company, L.P.