24.05.2014 Views

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

XL Fortran Enterprise Edition for AIX : User's Guide - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Related In<strong>for</strong>mation: You can use the “-F Option” on page 107 to select a different<br />

configuration file, a specific stanza in the configuration file,<br />

or both.<br />

Determining Which Level of <strong>XL</strong> <strong>Fortran</strong> Is Installed<br />

Sometimes, you may not be sure which level of <strong>XL</strong> <strong>Fortran</strong> is installed on a<br />

particular machine. You would need to know this in<strong>for</strong>mation be<strong>for</strong>e contacting<br />

software support.<br />

To check whether the latest level of the product has been installed through the<br />

system installation procedure, issue the command:<br />

lslpp -h "*xlf*"<br />

The result includes the version, release, modification, and fix level of the compiler<br />

image installed on the system.<br />

To check the level of the compiler executable itself, issue the command:<br />

what /usr/lpp/xlf/bin/xlfentry<br />

If the compiler is installed in a different directory, use the appropriate path name<br />

<strong>for</strong> the xlfentry file.<br />

You can also use the -qversion compiler option to see the version and release <strong>for</strong><br />

the compiler.<br />

Upgrading to <strong>XL</strong> <strong>Fortran</strong> Version 9<br />

Here is some advice to help make the transition from an earlier version of the <strong>XL</strong><br />

<strong>Fortran</strong> compiler as fast and simple as possible.<br />

Things to Note in <strong>XL</strong> <strong>Fortran</strong> Version 9<br />

Because <strong>XL</strong> <strong>Fortran</strong> Version 9.1 is highly compatible with <strong>XL</strong> <strong>Fortran</strong> Versions 8<br />

through 3 inclusive, most of the advice in this section applies to upgrades from<br />

Version 2, or earlier levels of <strong>XL</strong> <strong>Fortran</strong>.<br />

v<br />

v<br />

24 <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong> <strong>for</strong> <strong>AIX</strong> : User’s <strong>Guide</strong><br />

The xlf90, xlf90_r, and xlf90_r7 commands provide <strong>Fortran</strong> 90 con<strong>for</strong>mance, and<br />

the xlf95, xlf95_r, and xlf95_r7 commands provide <strong>Fortran</strong> 95 con<strong>for</strong>mance.<br />

However, these commands may cause some problems with existing FORTRAN<br />

77 programs. The xlf, xlf_r, xlf_r7, f77, and <strong>for</strong>t77 commands avoid some of<br />

these problems by keeping the old behavior wherever possible.<br />

<strong>Fortran</strong> 90 introduced the idea of kind parameters <strong>for</strong> types. Except <strong>for</strong> the types<br />

complex and character, <strong>XL</strong> <strong>Fortran</strong> uses numeric kind parameters that<br />

correspond to the lengths of the types. For the type complex, the kind parameter<br />

is equal to the length of the real portion, which is half of the overall length. For<br />

the type character, the kind parameter is equal to the number of bytes that are<br />

required to represent each character, and this value is 1. A FORTRAN 77<br />

declaration that is written using the * extension <strong>for</strong> length specifiers can now be<br />

rewritten with a kind parameter:<br />

INTEGER*4 X ! F77 notation with extension.<br />

INTEGER(4) X ! F90 standard notation.<br />

COMPLEX*8 Y ! *n becomes (n) <strong>for</strong> all types except<br />

COMPLEX(4) Y ! COMPLEX, where the value is halved.<br />

This new <strong>for</strong>m is the one we use consistently throughout the <strong>XL</strong> <strong>Fortran</strong><br />

manuals.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!