      FUNCTION DOTPRODUCT(A,B,N)
C
C----------------------------------------------------------------------
C.IDENTIFICATION: Function DOTPRODUCT
C.LIBRARY:        GENERAL        
C.AUTHOR:         L.Chiappetti - IFCTR Milano
C.VERSIONS:       0.0 - 25 Aug 97 - original version
C.PURPOSE:        (REAL*8) vector dot product
C.METHOD:         plain matrix algebra
C.SYNTAX:         number-=DOTPRODUCT(A,B,N)
C.PARAMETERS:     REAL*8 A,B    input arrays
C                 INTEGER N     array dimension
C----------------------------------------------------------------------
C
      DOUBLE PRECISION DOTPRODUCT,A(*),B(*)
      INTEGER I,N
      DOTPRODUCT=0.0
      DO 1 I=1,N
      DOTPRODUCT=DOTPRODUCT + A(I)*B(I)
 1    CONTINUE
      RETURN
      END
