Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | val | |||
character(len=2), | intent(in) | :: | operation | |||
real(kind=rk), | intent(in) | :: | threshold |
return value
function tem_comparator( val, operation, threshold ) result(comp) ! -------------------------------------------------------------------- ! !> real(kind=rk), intent(in) :: val !> character(len=2), intent(in) :: operation !> real(kind=rk), intent(in) :: threshold !> return value logical :: comp ! -------------------------------------------------------------------- ! comp = .false. select case( trim(operation)) case ('<') comp = (val < threshold) case ('<=') comp = (val <= threshold) case ('>') comp = (val > threshold) case ('>=') comp = (val >= threshold) case ('=') comp = (val .feq. threshold) end select end function tem_comparator