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.

If you are familiar with other compilers, particularly those in the <strong>XL</strong> family of<br />

compilers, you may already be familiar with many of these flags.<br />

You can also specify many command-line options in a <strong>for</strong>m that is intended to be<br />

easy to remember and make compilation scripts and makefiles relatively<br />

self-explanatory:<br />

►►<br />

-q option_keyword<br />

:<br />

►◄<br />

= ▼ suboption<br />

,<br />

= ▼ argument<br />

This <strong>for</strong>mat is more restrictive about the placement of blanks; you must separate<br />

individual -q options by blanks, and there must be no blank between a -q option<br />

and a following argument string. Unlike the names of flag options, -q option<br />

names are not case-sensitive except that the q must be lowercase. Use an equal<br />

sign to separate a -q option from any arguments it requires, and use colons to<br />

separate suboptions within the argument string.<br />

For example:<br />

xlf95 -qddim -qXREF=full -qfloat=nomaf:rsqrt -O3 -qcache=type=c:level=1 file.f<br />

Specifying Options in the Source File<br />

By putting the @PROCESS compiler directive in the source file, you can specify<br />

compiler options to affect an individual compilation unit. The @PROCESS<br />

compiler directive can override options specified in the configuration file, in the<br />

default settings, or on the command line.<br />

,<br />

►►<br />

@PROCESS<br />

▼<br />

option<br />

( suboption_list )<br />

►◄<br />

option<br />

is the name of a compiler option without the -q.<br />

suboption<br />

is a suboption of a compiler option.<br />

In fixed source <strong>for</strong>m, @PROCESS can start in column 1 or after column 6. In free<br />

source <strong>for</strong>m, the @PROCESS compiler directive can start in any column.<br />

You cannot place a statement label or inline comment on the same line as an<br />

@PROCESS compiler directive.<br />

By default, option settings you designate with the @PROCESS compiler directive<br />

are effective only <strong>for</strong> the compilation unit in which the statement appears. If the<br />

file has more than one compilation unit, the option setting is reset to its original<br />

state be<strong>for</strong>e the next unit is compiled. Trigger constants specified by the<br />

DIRECTIVE option are in effect until the end of the file (or until NODIRECTIVE<br />

is processed).<br />

Editing, Compiling, Linking, and Running <strong>XL</strong> <strong>Fortran</strong> Programs 37

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

Saved successfully!

Ooh no, something went wrong!