Compaq Fortran for Tru64 UNIX Alpha Systems V5.4
for_get_fpe, for_set_fpe (3f)
returns or sets floating-point exception flags
Syntax
integer*4 for_get_fpe, fpe_flags
external for_get_fpe
fpe_flags = for_get_fpe( )
integer*4 for_set_fpe, old_fpe_flags, new_fpe_flags
external for_set_fpe
old_fpe_flags = for_set_fpe ( new_fpe_flags )
Description
The for_get_fpe function gets the current settings of floating-point
exception flags. This function takes no argument.
The for_set_fpe function sets floating-point exception handling. This
function takes an integer*4 argument by reference, which contains bit flags
controlling floating-point exception trapping, reporting, and result
handling.
To get the flag definitions, include the following files:
• In Fortran programs: /usr/include/for_fpe_flags.f
• In C programs: /usr/include/for_fpe_flags.h
The -fpen options (see f90(1)) set the floating-point exception flags when
the Fortran main program begins execution, while the for_set_fpe function
allows the flags to be set after program initialization. (See also
for_rtl_init_(3f).)
Return Values
The for_get_fpe function returns an integer*4 value representing the
current floating-point exception flag settings. The meaning of the bits in
the returned value are documented in /usr/include/for_fpe_flags.f.
The for_set_fpe function returns an integer*4 value representing the
previous settings of the floating-point exception flags.
See Also
f90(1), for_rtl_init_(3f)