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 />

When you compile this program:<br />

REAL X, Y, Z<br />

DATA X /5.0/, Y /0.0/<br />

Z = X / Y<br />

PRINT *, Z<br />

END<br />

with the command:<br />

xlf95 -qflttrap=zerodivide:enable -qsigtrap divide_by_zero.f<br />

the program stops when the division is per<strong>for</strong>med.<br />

The zerodivide suboption identifies the type of exception to guard against. The<br />

enable suboption causes a SIGTRAP signal when the exception occurs. The<br />

-qsigtrap option produces in<strong>for</strong>mative output when the signal stops the program.<br />

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

See “-qsigtrap Option” on page 232.<br />

See “Detecting and Trapping Floating-Point Exceptions” on page 296 <strong>for</strong> full<br />

instructions on how and when to use the -qflttrap option, especially if you are just<br />

starting to use it.<br />

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

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

Saved successfully!

Ooh no, something went wrong!