a scalar is set to all the elements of a vector.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | n |
vector dimension. |
||
| real(kind=wp), | intent(in) | :: | a |
initial value. |
||
| real(kind=wp), | intent(out) | :: | x(*) |
x(n) output vector such that |
pure subroutine mxvset(n,a,x) real(wp),intent(in) :: a !! initial value. integer,intent(in) :: n !! vector dimension. real(wp),intent(out) :: x(*) !! x(n) output vector such that `x(i)=a` for all i. integer :: i do i = 1 , n x(i) = a end do end subroutine mxvset