      SUBROUTINE EIG(IBAL,A,KA,N,WR,WI,IERR)
      DIMENSION A(KA,N),WR(N),WI(N)
C ----------------------------------------------------------------------
C     IN THE FOLLOWING CODE IT IS ASSUMED THAT A REAL ARRAY CAN ALSO
C     SERVE AS AN INTEGER STORAGE SPACE. ON COMPUTERS WHERE THIS CANNOT
C     BE DONE ONE MAY USE THE FOLLOWING FORMAT ...
C
C     SUBROUTINE EIG(IBAL,A,KA,N,WR,WI,IERR,INDEX)
C     DIMENSION A(KA,N),WR(N),WI(N),INDEX(N)
C
C     ALSO MAKE THE MODIFICATION INDICATED BELOW.
C ----------------------------------------------------------------------
      LOW=1
      IGH=N
      IF (IBAL.NE.0) CALL BALANC(KA,N,A,LOW,IGH,WR)
      CALL ELMHES(KA,N,LOW,IGH,A,WR)
C ----------------------------------------------------------------------
C     CALL ELMHES(KA,N,LOW,IGH,A,INDEX)
C ----------------------------------------------------------------------
      CALL HQR(KA,N,LOW,IGH,A,WR,WI,IERR)
      RETURN
      END
