double dzasum (int n, doublecomplex *zx, int incx)
real scasum (int n, complex *cx, int incx)
Arguments
N
Number of elements in the vector. N 0.
xX
Input vector X; the size of array X must be at least max(1,N*|INCX|).
INCX
Specifies the storage spacing between successive elements of the vector X. A value of one indicates that the elements of the vector are consecutive in memory. INCX > 0.
If X refers to a two-dimensional array and the value of INCX is equal to the leading dimension of X then the elements of the vector will be a row of X.
If X refers to a two-dimensional array and the value of INCX is equal to the leading dimension of X plus one then the elements of the vector will be a diagonal of X.
Sample Program
PROGRAM TEST
IMPLICIT NONE
C
INTEGER N
PARAMETER (N = 4)
C
DOUBLE PRECISION SUM, X(N)
INTEGER I, INCX
C
DOUBLE PRECISION DASUM
EXTERNAL DASUM
C
C Initialize the array X to store the vector x shown below.