      logical function checkq (oldstr, newstr)
      integer*2 oldstr(*)
      integer*2 newstr(*)
      integer ic
      integer diff
      integer casedf
      save
         casedf = 97 - 65
         ic = 1
110      if (.not.(oldstr(ic) .ne. 0 .and. newstr(ic) .ne. 0)) goto 112
            if (.not.(oldstr(ic) .ne. newstr(ic))) goto 120
               if (.not.(((oldstr(ic).ge.65.and.oldstr(ic).le.90).or.(
     *         oldstr(ic).ge.97.and.oldstr(ic).le.122)) .and. ((newstr(
     *         ic).ge.65.and.newstr(ic).le.90).or.(newstr(ic).ge.97.and.
     *         newstr(ic).le.122)))) goto 130
                  diff = abs (newstr(ic) - oldstr(ic))
                  if (.not.(diff .ne. casedf)) goto 140
                     goto 112
140               continue
                  goto 131
130            continue
                  goto 112
131            continue
120         continue
111         ic = ic + 1
            goto 110
112      continue
         checkq = (oldstr(ic) .eq. 0 .and. newstr(ic) .eq. 0)
         goto 100
100      return
      end
c     checkq  check_eq
c     casedf  casediff
