Repeat
Repeat a vector.
Interface
- ܀ Interface
- ️܀ See example
- ↢
MODULE PURE FUNCTION Repeat(Val, rtimes) RESULT(Ans)
INTEGER(Int8|Int16|Int32|Int64|Real32|Real64), INTENT(IN) :: Val(:)
INTEGER(I4B), INTENT(IN) :: rtimes
INTEGER(Int8| Int16 | Int32 | Int64| Real32 | Real64) :: Ans(SIZE(Val) * rtimes)
END FUNCTION Repeat
In this example we test Repeat function.
program main
use easifemBase
implicit none
call Display(Repeat([1,2,3], 3), "Repeat test(1) = " )
call Display(Repeat([1.,2.,3.], 3), "Repeat test(2) = " )
end program main
Results
Repeat test(1) =
1
2
3
1
.
.
.
3
1
2
3
Repeat test(2) =
1.00000
2.00000
3.00000
1.00000
.
.
.
3.00000
1.00000
2.00000
3.00000