Checks if the given integer is within the specified segment.
This function determines whether the integer a
falls within the
range defined by the min
and max
values of the segment_t
type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | a | |||
type(segment_t), | intent(in) | :: | seg |
pure elemental function arg_in_segment(a, seg) result(res) implicit none integer(int32), intent(in) :: a type(segment_t), intent(in) :: seg logical :: res res = seg%min <= a .and. a <= seg%max end function arg_in_segment