      subroutine geohlp
      character*1 ans,sp
      character*6 var
      character*79 line,blank
      data blank/' '/,sp/#20/
      open(10,file='geohlp.hlp',status='old')
      write(*,'(2a\)')' want general help or a specific variable',
     & '[ g or s] '
      read(*,'(a)') ans

      if(ans.eq.'g'.or.ans.eq.'G') then
        n = 0
   10   read(10,'(a)',end=150) line
        write(*,'(1x,a)') line
        n = n + 1
        if(n.lt.23) go to 10
        write(*,'(a\)') ' more? [y]'
        read(*,'(a)') ans
        if(ans.eq.'n'.or.ans.eq.'N') go to 200
        write(*,'(1x,a)') line
        n = 0
        go to 10
      endif

   20   write(*,'(/a\)') ' enter variable name or ENTER to quit: '
        read(*,'(a)') var
        if(var(1:1).eq.sp) go to 200
        call upcase(var)
        write(*,'(1x,a)') blank
   30   read(10,'(a)',end=100) line
        if(line(2:7).ne.var) go to 30
        write(*,'(1x,a)') line
   40   read(10,'(a)',end=200) line
        if(line.ne.blank) then
          write(*,'(1x,a)') line
          go to 40
        else
          rewind(10)
          go to 20
        endif

  100 write(*,'(a,a6,a)') ' variable: ',var,' not found'
      write(*,'(a\)') ' more help ? [y] '
      read(*,'(a)') ans
      if(ans.ne.'n'.and.ans.ne.'N') then
        rewind(10)
        go to 20
      endif 
      go to 200
  150 pause ' END OF HELP FILE - press ENTER to return to menu'
  200 close(10)
      return
      end
c****************************************************************
      subroutine upcase(var)
C
      character*(*) var
C
      ilen=len(var)
      do 10 i=1,ilen
        k=ichar(var(i:i))
        if(k.ge.97.and.k.le.122) var(i:i)=char(k-32)
   10 continue
      return
      end
