subroutine mnegv (n, A) c double precision A(1) integer n c ***----------------------------------------------------------*** c * 'mnegv' overwrites A with -A. * c * * c * on entry * c * * c * n [integer] * c * The (implicit) number of rows and columns * c * in A. A is accessed as a 1D array inside * c * this subroutine. * c * * c * A [double precision(n**2)] * c * The matrix to be negated. * c * * c * on return * c * * c * n [integer] * c * Unchanged. * c * * c * A [double precision(n**2)] * c * Overwritten with -A. * c ***----------------------------------------------------------*** integer k, nsquar c nsquar = n**2 do 10 k = 1, nsquar A(k) = - A(k) 10 continue return end