HP MLIB User's Guide Vol. 1 7th Ed.

Chapter 2 Basic Vector Operations 141
Swap two vectors SSWAP/DSWAP/ISWAP/CSWAP/ZSWAP
Name SSWAP/DSWAP/ISWAP/CSWAP/ZSWAP
Swap two vectors
Purpose Given real, integer, or complex vectors x and y of length n, these subprograms
perform the vector interchange operation
The vectors can be stored in one-dimensional arrays or in either rows or
columns of two-dimensional arrays. The indexing through the arrays can be
either forward or backward.
Usage VECLIB:
INTEGER*4 n, incx, incy
REAL*4 x(lenx), y(leny)
CALL SSWAP(n, x, incx, y, incy)
INTEGER*4 n, incx, incy
REAL*8 x(lenx), y(leny)
CALL DSWAP(n, x, incx, y, incy)
INTEGER*4 n, incx, incy, x(lenx), y(leny)
CALL ISWAP(n, x, incx, y, incy)
INTEGER*4 n, incx, incy
COMPLEX*8 x(lenx), y(leny)
CALL CSWAP(n, x, incx, y, incy)
INTEGER*4 n, incx, incy
COMPLEX*16 x(lenx), y(leny)
CALL ZSWAP(n, x, incx, y, incy)
VECLIB8:
INTEGER*8 n, incx, incy
REAL*4 x(lenx), y(leny)
CALL SSWAP(n, x, incx, y, incy)
INTEGER*8 n, incx, incy
REAL*8 x(lenx), y(leny)
CALL DSWAP(n, x, incx, y, incy)
INTEGER*8 n, incx, incy, x(lenx), y(leny)
CALL ISWAP(n, x, incx, y, incy)
xy.