Converts a real into a logical.
0 equals to false, everything else equals to true.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | value |
The value to interpret as boolean |
The value interpreted as boolean
function realToLogical(value) result(res)
! ------------------------------------------------------------------------ !
!> The value to interpret as boolean
real(kind=rk), intent(in) :: value
!> The value interpreted as boolean
logical :: res
! ------------------------------------------------------------------------ !
res = .not. (value .feq. numFalse)
end function realToLogical