Test whether a value lies within the inclusive range [lo, hi].
Returns .true. when lo <= x .and. x <= hi. Supported types are:
integer(int32), integer(int64), real(sp), real(dp).
Usage: flag = is_in_range(x, lo, hi)
Inclusive range test for integer(int32).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(in) | :: | x | |||
| integer(kind=int32), | intent(in) | :: | lo | |||
| integer(kind=int32), | intent(in) | :: | hi |
Inclusive range test for integer(int64).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | x | |||
| integer(kind=int64), | intent(in) | :: | lo | |||
| integer(kind=int64), | intent(in) | :: | hi |
Inclusive range test for real(sp).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | x | |||
| real(kind=sp), | intent(in) | :: | lo | |||
| real(kind=sp), | intent(in) | :: | hi |
Inclusive range test for real(dp).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | x | |||
| real(kind=dp), | intent(in) | :: | lo | |||
| real(kind=dp), | intent(in) | :: | hi |