      integer function resfnd (soustr, questr)                          RESF001
c                                                                       RESF002
c     implicit none                                                     RESF003
c     implicit complex(a-z)                                             RESF004
c                                                                       RESF005
      character soustr*(*), questr*3                                    RESF006
c                                                                       RESF007
      integer respl, nxpl                                               RESF008
c                                                                       RESF009
      respl = index(soustr,questr)                                      RESF010
  100 continue                                                          RESF011
      if (mod(respl,3) .ne. 1 .and. respl .ne. 0) then                  RESF012
         nxpl = index(soustr(respl+1:),questr)                          RESF013
         if (nxpl .ne. 0) then                                          RESF014
            respl = respl + nxpl                                        RESF015
         else                                                           RESF016
            respl = nxpl                                                RESF017
         end if                                                         RESF018
         goto 100                                                       RESF019
      end if                                                            RESF020
      resfnd = respl                                                    RESF021
      end                                                               RESF022
