ieee_get_halting_mode
- Date:
10-12-2011
NAME
IEEE_GET_HALTING_MODE - Determines if a floating-point exception halts execution
SYNOPSIS
CALL IEEE_GET_HALTING_MODE ([FLAG=]flag [, [HALTING=]halting])
TYPE(IEEE_FLAG_TYPE) :: flag = flag_value
LOGICAL :: halting
STANDARDS
Fortran
IEEE Standard for Binary Floating-point Arithmetic
DESCRIPTION
The IEEE_GET_HALTING_MODE intrinsic subroutine is called to determine if the floating-point exception specified by flag will cause halting. It accepts the following arguments:
- flag
Must be of type TYPE(IEEE_FLAG_TYPE). It specifies the IEEE flag to be obtained. The value of flag may be one of the following named constants:
IEEE_DIVIDE_BY_ZERO
IEEE_INEXACT
IEEE_INVALID
IEEE_OVERFLOW
IEEE_UNDERFLOW
- halting
Must be of type logical. It is an INTENT(OUT) argument. If the floating-point exception halts execution when it is raised, the value of halting is true. Otherwise, the value of halting is false.
The name of this intrinsic subroutine cannot be passed as an argument.
NOTES
The IEEE intrinsic procedures use the named constants contained in a system module, so you must include the following statement in your program:
USE, INTRINSIC :: IEEE_EXCEPTIONS
RETURN VALUES
The result type and type parameter is default logical.
The result value in halting is true if the corresponding exception flag halts execution and is false otherwise.
EXAMPLES
Example 1:
USE, INTRINSIC :: IEEE_ARITHMETIC
USE, INTRINSIC :: IEEE_EXCEPTIONS
LOGICAL ovflo_stop
REAL xdeflt
TYPE(IEEE_FLAG_TYPE) :: ovflo_halts = IEEE_OVERFLOW
! floatingpt operation on xdeflt
CALL IEEE_GET_HALTING_MODE(ovflo_halts, ovflo_stop)
IF ( ovflo_stop) THEN
ENDIF
SEE ALSO
ieee_set_halting_mode(3i)