Table 38 f77 options replaced by f90 options (continued)

f77 option

f90 replacement

-D

+dlines

 

 

+es

+extend_source

 

 

-F

+cpp_keep

 

 

-L

+list

 

 

-onetrip

+onetrip

 

 

+Q

+pre_include

 

 

+s

a+langlvla

 

 

+T

+fp_exception

 

 

+ttyunbuf

+nottybuf

 

 

-U

+uppercase

 

 

-u

+implicit_none

 

 

-V

+lista

a Does not fully replace.

Format field widths

HP Fortran 90 supports format field widths up to 32767. In contrast, HP FORTRAN 77 allows format field widths up to 2147483639, which is close to 2**31.

Floating-point constants

The HP Fortran compiler differs from HP FORTRAN 77 in its handling of floating-point constants. The HP Fortran compiler conforms to the standard: a single-precision constant is treated as a single-precision data item in all situations, regardless of how many digits were supplied when specifying it. HP FORTRAN 77 actually scans and saves constants internally in double precision. This behavior can produce slightly different results.

In HP Fortran, the statement

DOUBLE PRECISION x = 3.1415926535

will initialize to only 32 bits worth of the constant because it interprets the constant as single precision. Under HP Fortran, a constant must have a D exponent or aKIND suffix to be interpreted as double precision.

In programs that use double precision exclusively, you should consider using the

+real_constant=doubleoption, which causes real constants to default to double precision. For more information, see “Controlling data storage” (page 67).

Intrinsic functions

The Fortran 90 standard has introduced new intrinsics that may collide with function or subroutine names in FORTRAN 77 code. You can resolve such collisions by declaring all procedures that you have written—but especially those that have the same name as nonstandard HP Fortran intrinsics—with the EXTERNAL statement. For a list of nonstandard HP Fortran intrinsics, see Table 11-4 on page 239.

Also, HP FORTRAN 77 allows intrinsics to accept a wider variety of argument types than HP Fortran does. For example, in HP FORTRAN 77 the MAX andMIN intrinsics can take arguments of different types, while HP Fortran follows the standard and requires all arguments to be of the same type.

132 Migrating to HP Fortran