title: Julia Lang If Statement issue
body: <p>I have been trying to run a code similar to the following but the evaluation hangs on and consumes all the pc memory.... What I'm doing wrong?</p>
  <pre><code>function db(v)
  c=0;
  r=0;
  i=1;
  while i&lt;=lastindex(v)
      if v[i]==0
          c=c+1
      else
       r=r+1
      end
  end
  return c;
  return r;
  end
  
  r=[1,0,4,5,0,0,7];
  </code></pre>
  <p>db(r) &gt; hogs the memory an no result....</p>