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.

<strong>Fortran</strong>-Related <strong>AIX</strong> Commands<br />

You can use some <strong>AIX</strong> commands with <strong>XL</strong> <strong>Fortran</strong> files to per<strong>for</strong>m several tasks, as<br />

outlined in this section.<br />

Related In<strong>for</strong>mation: See the <strong>AIX</strong> Commands Reference <strong>for</strong> full details on these<br />

commands.<br />

Working with Object-Code Archives (ar)<br />

The ar command per<strong>for</strong>ms operations on libraries of object files that are used<br />

during linking. You might use this command to create a library of support routines<br />

that can be linked into many different programs, as follows:<br />

ar -q ~/mylibs/graphics.a raytrace.o shade.o illuminate.o<br />

xlf95 spheres.f -L~/mylibs/ -lgraphics<br />

Printing Output Files with <strong>Fortran</strong> ASA Carriage Controls (asa)<br />

The asa command translates the output of <strong>Fortran</strong> programs that use the historical<br />

<strong>Fortran</strong> convention <strong>for</strong> ASA carriage-control characters.<br />

The translated output is suitable <strong>for</strong> the qprt command:<br />

generate_output | asa | qprt<br />

The fpr command is the same as the asa command.<br />

For a list of supported carriage-control characters, see Formatted Records in the <strong>XL</strong><br />

<strong>Fortran</strong> <strong>Enterprise</strong> <strong>Edition</strong> <strong>for</strong> <strong>AIX</strong> Language Reference.<br />

Splitting Subprograms into Individual Files (fsplit)<br />

The fsplit command splits the specified <strong>Fortran</strong> source program files into several<br />

files. You should only use fsplit with FORTRAN 77 programs.<br />

$ cat fsplit.f<br />

subroutine sub1<br />

print *,’Hello world’<br />

end<br />

subroutine sub2<br />

print *,’Goodbye’<br />

end<br />

program main<br />

call sub1<br />

call sub2<br />

end<br />

$ fsplit fsplit.f<br />

sub1.f<br />

sub2.f<br />

main.f<br />

© Copyright <strong>IBM</strong> Corp. 1990, 2004 395

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

Saved successfully!

Ooh no, something went wrong!