RemoveDuplicates
This routine removes duplicate entries from the set of integer.
Calling example:
CALL RemoveDuplicates(avec)
Interface
- ܀ Interface
- ️܀ See example
- ↢
MODULE PURE SUBROUTINE RemoveDuplicates_1d(obj)
INTEGER(Int8|Int16|Int32|Int64), ALLOCATABLE, INTENT(INOUT) :: obj(:)
END SUBROUTINE RemoveDuplicates_1d
This example shows the usage of RemoveDuplicates
method which is defined in IntegerUtility
MODULE
program main
use easifembase
implicit none
integer(i4b), allocatable :: intvec( : )
intvec = [ 5, 4, 4, 4, 3, 3, 2, 2, 1, 1, 1 ]
call RemoveDuplicates( intvec )
call display( intvec, "intvec = " )
end program main
Results
intvec =
---------
1
2
3
4
5