function luaY.searchvar(K,i,c)for J=i.nactvar-1,0,-1 do if c==(K:getlocvar(i,J)).varname then return J end end return-1 end

function luaY:searchvar(fs, n)
  for i = fs.nactvar - 1, 0, -1 do
    if n == self:getlocvar(fs, i).varname then
      return i
    end
  end
  return -1  -- not found
end
