realToLogical Function

public function realToLogical(value) result(res)

Converts a real into a logical.

0 equals to false, everything else equals to true.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: value

The value to interpret as boolean

Return Value logical

The value interpreted as boolean


Called by

proc~~realtological~~CalledByGraph proc~realtological realToLogical proc~evallogicaland_forelement evalLogicalAnd_forElement proc~evallogicaland_forelement->proc~realtological proc~evallogicalor_forelement evalLogicalOr_forElement proc~evallogicalor_forelement->proc~realtological

Source Code

  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