is it possible cutting compiler complaint if return type is object?
<pre><code> pseudocode :
  function takes "int c" and "list d" 
          from start to end of the list search "c" in "list d"
               when see it 
                    return index
</code></pre>

<p>Due to writing return in iteration, compiler start to complain about non void function.
How can I cut compiler complaint ?</p>

<p>Note : c always in list but index of it is not be known .</p>

<p>EDIT : If  I change like below ;</p>

<pre><code>  pseudocode :
  function takes "string name" and "list d" 
          from start to end of the list search "c" in "list d"
               when see it 
                    return object
</code></pre>

<p>What will I do ?</p>
