Returns a 1-d array of floating-point zeros. This procedure is overloaded by
the generic procedure zeros
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ik), | intent(in) | :: | length | Array length |
||
real(kind=rk), | 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_real(length,kindflag) result(zeros)
!! Returns a 1-d array of floating-point zeros. This procedure is overloaded by
!! the generic procedure `zeros`.
integer(kind=ik),intent(in) :: length !! Array length
real(kind=rk),intent(in) :: kindflag !! Array type
real(kind=rk),dimension(:),allocatable :: zeros
allocate(zeros(length))
zeros = 0._rk
endfunction zeros_real