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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Examples<br />

! This program is written in <strong>Fortran</strong> free source <strong>for</strong>m.<br />

PROGRAM DIRECTV<br />

INTEGER A, B, C, D, E, F<br />

A = 1 ! Begin in free source <strong>for</strong>m.<br />

B = 2<br />

!OLDSTYLE SOURCEFORM(FIXED)<br />

! Switch to fixed source <strong>for</strong>m <strong>for</strong> this include file.<br />

INCLUDE ’set_c_and_d.inc’<br />

!<strong>IBM</strong>* SOURCEFORM(FREE)<br />

! Switch back to free source <strong>for</strong>m.<br />

E = 5<br />

F = 6<br />

END<br />

For this example, compile with the option -qdirective=oldstyle to ensure that the<br />

compiler recognizes the SOURCEFORM directive be<strong>for</strong>e the INCLUDE line. After<br />

processing the include-file line, the program reverts back to free source <strong>for</strong>m, after<br />

the SOURCEFORM(FREE) statement.<br />

Related In<strong>for</strong>mation<br />

See the section on the SOURCEFORM directive in the <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong><br />

<strong>for</strong> <strong>AIX</strong> Language Reference.<br />

As the use of incorrect trigger constants can generate warning messages or error<br />

messages or both, you should check the particular directive statement in the<br />

Directives section of the <strong>XL</strong> <strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong> <strong>for</strong> <strong>AIX</strong> Language Reference <strong>for</strong><br />

the suitable associated trigger constant.<br />

<strong>XL</strong> <strong>Fortran</strong> Compiler-Option Reference 149

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

Saved successfully!

Ooh no, something went wrong!