ieee_get_flag
- Date:
10-12-2011
NAME
IEEE_GET_FLAG - Retrieves the value of a current floating-point exception flag
SYNOPSIS
CALL IEEE_GET_FLAG ([FLAG=]flag [, [FLAG_VALUE=]flag_value])
TYPE(ieee_flag_type) :: flag = IEEE_OVERFLOW
LOGICAL :: flag_value
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
Fortran
IEEE Standard for Binary Floating-point Arithmetic
DESCRIPTION
The IEEE_GET_FLAG intrinsic subroutine is called to obtain a flag that represents a particular floating-point exception. 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
- flag_value
Must be of type logical. It is an INTENT(OUT) argument.
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 flag_value is true if the corresponding exception flag is signaling, otherwise, it is false.
EXAMPLES
Example 1:
USE, INTRINSIC :: IEEE_ARITHMETIC
USE, INTRINSIC :: IEEE_EXCEPTIONS
LOGICAL excep_current
REAL xdeflt
TYPE(IEEE_FLAG_TYPE) :: ovflo_status = IEEE_OVERFLOW
! floatingpt operation on xdeflt
CALL IEEE_GET_FLAG(ovflo_status, excep_current)
IF ( excep_current) THEN
...
ENDIF
SEE ALSO
ieee_set_flag(3i)