Returns a 1-d array of integer ones. This procedure is overloaded by the
generic procedure ones
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ik), | intent(in) | :: | length | Array length |
||
integer(kind=ik), | intent(in) | :: | kindflag | Array type |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
pure function ones_int(length,kindflag) result(ones)
!! Returns a 1-d array of integer ones. This procedure is overloaded by the
!! generic procedure `ones`.
integer(kind=ik),intent(in) :: length !! Array length
integer(kind=ik),intent(in) :: kindflag !! Array type
integer(kind=ik),dimension(:),allocatable :: ones
allocate(ones(length))
ones = 1
endfunction ones_int