logical(bool) function intervalsAreWellFormed(intervals) type(IntervalT), intent(in) :: intervals(:) end function intervalsAreWellFormed
Many of the other functions in the present section don't work unless the intervals are `well-formed'. I define a well-formed vector of type IntervalT as obeying two conditions: (i) for each interval, the lower value must be < the upper; (ii) the upper value of interval i must be < the lower value of interval i+1. The function returns FALSE if either condition is disobeyed.
See section 9.5.1 for analogous conditions on structures of RangeT type.