If the file is compiled with the +source=free option, the compiler assumes free form, regardless of the extension.

If the file is compiled with the +extend_source option, the compiler allows lines as long as 254 characters in either fixed or free form. The default line length is 72 characters for fixed form and 132 characters for free form.

See the HP Fortran Programmer’s Reference for detailed information about the different source and the +langlvl=90, +source, and +extend_source options.

Escape sequences

Some implementation of Fortran process certain characters preceded by the backslash (\) as a C-like escape sequence. For example, if a program containing the statement:

PRINT *, 'a\nb\nc'

were compiled under an implementation that recognized escape sequences, the statement would output:

a

b c

When compiled in strict compliance with the Standard, the same statement would output:

a\nb\nc

Although HP Fortran does not recognize escape sequences by default, you can use the

+escapeoption to make the compiler to recognize them. See the HP Fortran Programmer’s Reference for more information about escape sequences.

Porting from Tru64 to HP Fortran

Support has been added for options that will assist users in porting applications from Tru64 to HP Fortran. Wherever possible, these options mimic the behavior of their counterparts in the Tru64 Fortran compiler.

+cfc

The +cfc flag has been added to the Fortran compiler. +cfcallows you access to the newly-implemented Tru64 Fortran options. You can call them in one of two ways:

/opt/fortran90/tru64/f90

opt/fortran90/bin/f90and then place +cfcin the command line

It is important to note that +cfcrequires the following runtime library patches to function properly:

PHSS_31970—liblO77 11.22/11.23 0409

PHSS_31971—libcl 11.11

PHSS_31972—libcl 11.23 0409 (also pa-sharelibs for use through aries)

PHSS_31973—libF90 11.22/11.23 0409

PHSS_31974—libF90 11.11

NOTE: +cfcwill not work without the patches listed above.

148 Porting to HP Fortran

Page 148
Image 148
HP UX Fortran Software manual Porting from Tru64 to HP Fortran, Escape sequences, +cfc