
PROGRAM TEST

IMPLICIT NONE

C

INTEGER N

PARAMETER (N = 3)

C

INTEGER I, INCX, INCY, J

DOUBLE PRECISION A(N,N), B(N,N)

C

EXTERNAL DCOPY

C

C Initialize the array A to store the matrix A shown below.

C

C 1 4 7

C A = 2 5 8

C 3 6 9

C

DATA A / 1.0D0, 2.0D0, 3.0D0, 4.0D0, 5.0D0, 6.0D0,

$ 7.0D0, 8.0D0, 9.0D0 /

C

PRINT 1000

PRINT 1010, ((A(I,J), J = 1, N), I = 1, N)

INCX = 0

INCY = 1

C

C Use DCOPY to initialize all element of B to zero.

C

CALL DCOPY (N * N, 0.0D0, INCX, B, INCY)

C

C Copy A' into B.

C

INCX = 1

INCY = N

DO 10, I = 1, N

CALL DCOPY (N, A(1,I), INCX, B(I,1), INCY)

10 CONTINUE

PRINT 1020

PRINT 1010, ((B(I,J), J = 1, N), I = 1, N)

C

1000 FORMAT (1X, 'A:')

1010 FORMAT (3(3(2X, F3.1) / ))

1020 FORMAT (1X, 'A'':')

C

END

