Checks if an array is ascending ordered.
y = is_ordered(arr)
Where:
arr
: Array to test if it is ascending ordered.It returns .TRUE. if the array is ascending ordered and .FALSE. otherwise.
The following program checks if an array is ascending ordered:
PROGRAM is_orderedExample
USE FU_Arrays, ONLY: is_ordered
IMPLICIT NONE
REAL,DIMENSION(6) :: X = (/1., 2., 3., 4., 5., 6./)
WRITE(*,*) is_ordered(X)
END PROGRAM is_orderedExample
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in), | DIMENSION(:) | :: | arr |
Vector to test if it is ascending ordered |
.TRUE. if it is ascending ordered, .FALSE. otherwise
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in), | DIMENSION(:) | :: | arr |
Vector to test if it is ascending ordered |
.TRUE. if it is ascending ordered, .FALSE. otherwise
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=qp), | intent(in), | DIMENSION(:) | :: | arr |
Vector to test if it is ascending ordered |
.TRUE. if it is ascending ordered, .FALSE. otherwise