In
This routine returns true if an integer set is a subset of another integer set.
Calling example:
abool = [1,2,3] .in. [1,3,4,5,2]
Interface 1
- ܀ Interface
- ️܀ See example
- ↢
MODULE PURE FUNCTION In(a, b) RESULT(Ans)
INTEGER(INT8| Int16 | Int32 | Int64), INTENT(IN) :: a(:)
INTEGER(INT8| Int16 | Int32 | Int64), INTENT(IN) :: b(:)
LOGICAL(LGT) :: ans
END FUNCTION In
This example shows the usage of In
method.
program main
use easifembase
implicit none
call OK( 12 .In. [9, 10, 11, 12], "test(1)=")
call OK( .NOT. (13 .In. [9, 10, 11, 12]), "test(2)=")
end program main
Interface 2
- ܀ Interface
- ️܀ See example
- ↢
MODULE PURE FUNCTION In(a, b) RESULT(Ans)
INTEGER(INT8), INTENT(IN) :: a
INTEGER(INT8), INTENT(IN) :: b(:)
LOGICAL(LGT) :: ans
END FUNCTION In
This example shows the usage of In
method.
program main
use easifembase
implicit none
call OK( .NOT. ([9, 10, 11, 12] .In. [12,9]), "test(1)=")
call OK( [12,9] .In. [9, 10, 11, 12], "test(2)=")
end program main