c
c
c***********************************************************************
c
      subroutine VARERR ( iprint, ierr, k ) 
c
c-----------------------------------------------------------------------
c
c     print error messages
c
      logical ip
      common /blokip/ ip
      integer errno,output
      data output /6/
c
      if (iprint.lt.0) go to 1600
      errno=iabs(ierr)
      go to (1530,1540,1600,1550,1560,  1570,1580,1590), errno
c
1530  write (output,1610)
      if (ip) write (10,1610) 
      go to 1600
1540  write (output,1620)
      if (ip) write (10,1620) 
      go to 1600
1550  write (output,1630)
      if (ip) write (10,1630) 
      go to 1600
1560  write (output,1640)
      if (ip) write (10,1640) 
      go to 1600
1570  write (output,1650) k
      if (ip) write (10,1650) k
      go to 1600
1580  write (output,1660) k
      if (ip) write (10,1660) k
      go to 1600
1590  write (output,1670) k
      if (ip) write (10,1670) k
c
1600  return
1610  format (' '/2x,'problem terminated for excessive iterations'//) 
1620  format (' '/2x,'problem terminated because of ill-conditioning'//)
1630  format (' '/2x,'input error in parameter n,kg,m,npp2, or mmax.'//)
1640  format (' '/2x,'error -- inc matrix improperly specified',
     2        ' or disagrees with npp2.'//)
1650  format (' '/2x,'error -- weight(',i4,') not nonnegative.'//)
1660  format (' '/2x,'error -- constant column',i3,
     2        ' must be computed only when isel = 1.'//)
1670  format (' '/2x,'catastrophic failure -- column',i4,
     2        ' is zero. see rall and funderlic''s documentation.'//) 
c
      end 
