8.4.9 NotInInterval Procedure

The NotInInterval procedure provides a way to check whether or not a value lies outside of a specified interval. The interval is considered to be a closed interval that includes the end-points. For an array-valued X, all the values must satisfy the condition for the result to be true.

Note that I would rather call this routine ``Not_In_Interval'', but the F90 standard does not allow underscores in defined operator names (i.e. ``.Not_In_Interval.'' is not allowed).

Calling syntax:

Logical = X .NotInInterval. (/Int1, Int2/) |
, |

Logical = X .NotInInterval. Interval |
or |

Logical = NotInInterval(X, Interval) |

Input variables:

X |
Input integer or real, scalar or array variable. | ||

Interval |
A vector of length 2 that specifies the extents of the interval to be checked. | ||

(/Int1, Int2/) |
A means of expressing an interval without declaring a vector. |

Output variable:

NotInInterval |
Logical which is true if X is in the closed interval, which includes the end-points. |

The NotInInterval code listing contains additional documentation.

Michael L. Hall