```01:       SUBROUTINE ZSWAP(N,ZX,INCX,ZY,INCY)
02: *     .. Scalar Arguments ..
03:       INTEGER INCX,INCY,N
04: *     ..
05: *     .. Array Arguments ..
06:       DOUBLE COMPLEX ZX(*),ZY(*)
07: *     ..
08: *
09: *  Purpose
10: *  =======
11: *
12: *     ZSWAP interchanges two vectors.
13: *
14: *  Further Details
15: *  ===============
16: *
17: *     jack dongarra, 3/11/78.
18: *     modified 12/3/93, array(1) declarations changed to array(*)
19: *
20: *  =====================================================================
21: *
22: *     .. Local Scalars ..
23:       DOUBLE COMPLEX ZTEMP
24:       INTEGER I,IX,IY
25: *     ..
26:       IF (N.LE.0) RETURN
27:       IF (INCX.EQ.1 .AND. INCY.EQ.1) GO TO 20
28: *
29: *       code for unequal increments or equal increments not equal
30: *         to 1
31: *
32:       IX = 1
33:       IY = 1
34:       IF (INCX.LT.0) IX = (-N+1)*INCX + 1
35:       IF (INCY.LT.0) IY = (-N+1)*INCY + 1
36:       DO 10 I = 1,N
37:           ZTEMP = ZX(IX)
38:           ZX(IX) = ZY(IY)
39:           ZY(IY) = ZTEMP
40:           IX = IX + INCX
41:           IY = IY + INCY
42:    10 CONTINUE
43:       RETURN
44: *
45: *       code for both increments equal to 1
46:    20 DO 30 I = 1,N
47:           ZTEMP = ZX(I)
48:           ZX(I) = ZY(I)
49:           ZY(I) = ZTEMP
50:    30 CONTINUE
51:       RETURN
52:       END
53: ```