	integer function isrchne(n, x, inc, target)
c
c	search a x(..) for 1st element ne to target
c
	integer x(*), target
	integer n, inc

	isrchne = 0
	if (n.le.0) return
	j = 1
	do i = 1, n
	    if (x(j).ne.target) then
		isrchne = i
		return
	    endif
	    j = j + inc
	enddo
	isrchne = n + 1
	return
	end

c real version of isrchne
        integer function isrchner(n, x, inc, target)
c
c       search a x(..) for 1st element ne to target
c
        real x(*), target
        integer n, inc

        isrchner = 0
        if (n.le.0) return
        j = 1
        do i = 1, n
            if (x(j).ne.target) then
                isrchner = i
                return
            endif
            j = j + inc
        enddo
        isrchner = n + 1
        return
        end
