      complex function FM06AS(N,A,IA,B,IB)
      implicit COMPLEX (A-H,O-Z)
      include 'MOP6FILE'
      complex A(*), B(*)
*******************************************************
*
*    FM06AS - A FUNCTION ROUTINE TO COMPUTE THE VALUE OF THE
*      INNER PRODUCT, OR DOT PRODUCT, OF TWO SINGLE PRECISION
*      complex VECTORS, ACCUMULATING THE INTERMEDIATE PRODUCTS
*      double precision.  THE ELEMENTS OF EACH VECTOR CAN BE
*      STORED IN ANY FIXED DISPLACEMENT FROM NEIGHBOURING
*      ELEMENTS.
*
*    COMPUTES: SUM(J=1,N) A((J-1)*IA+1)*B((J-1)*IB+1)
*
*          W = FM06AS(N,A,IA,B,IB)
*
*    N   INTEGER SCALAR; (USER:*); LENGTH OF THE VECTORS A AND B.
*        IF N <= 0 THE INNER PRODUCT VALUE IS DEFINED TO BE ZERO.
*    A   COMPLEX*8 ARRAY((N-1)*IABS(IA)+1); (USER:*); THE ARRAY
*        CONTAINING THE 1ST VECTOR.  THE FORTRAN CONVENTION OF STORING
*        real AND IMAGINARY PARTS IN ADJACENT WORDS IS ASSUMED.
*    IA  INTEGER SCALAR; (USER:*); THE SUBSCRIPT DISPLACEMENT OF
*        AN ELEMENT IN THE ARRAY A TO ITS NEIGHBOUR, I.E. THE VECTOR
*        ELEMENTS ARE IN A(1), A(IA+1), A(2*IA+1),...
*        IF IA < 0 THE ELEMENTS ARE ASSUMED TO BE STORED IN
*        A(1-(N-1)*IA), A(1-(N-2)*IA),..., A(1-IA), A(1).
*    B   COMPLEX*8 ARRAY((N-1)*IABS(IA)+1); (USER:*); THE ARRAY
*        CONTAINING THE SECOND VECTOR.  TREAT LIKE A.
*    IB  INTEGER SCALAR; (USER:*); THE SUBSCRIPT DISPLACEMENT OF
*        AN ELEMENT IN B TO ITS NEIGHBOUR. TREAT LIKE IA.
*    FM06AS  COMPLEX FUNCTION; (*:FM06AS); THE INNER PRODUCT VALUE.
*        IT IS RETURNED double precision, THE REAL PART IN FLT PNT
*        REG 0 AND THE IMAGINARY PART IN FLT PNT REG 2.
*
*    THIS ROUTINE IS WRITTEN IN FORTRAN.
*
*--------------------------------------------------------*
      SUM=(0.0,0.0)
      do 10 I=1,N
   10 SUM=SUM+A((I-1)*IA+1)*B((I-1)*IB+1)
      FM06AS=SUM
      return
      end
