Returns a 1-d array of integer zeros. This procedure is overloaded by the
generic procedure zeros
.
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 zeros_int(length,kindflag) result(zeros)
!! Returns a 1-d array of integer zeros. This procedure is overloaded by the
!! generic procedure `zeros`.
integer(kind=ik),intent(in) :: length !! Array length
integer(kind=ik),intent(in) :: kindflag !! Array type
integer(kind=ik),dimension(:),allocatable :: zeros
allocate(zeros(length))
zeros = 0
endfunction zeros_int