title: Control the flow with logical operator in Julia
body: <p>I am trying to run a <code>while</code> cycle with <code>or</code> and <code>and</code> conditions in Julia.</p>
  
  <p>In Python I could do </p>
  
  <pre><code>while something and somethingelse:
      staff happens
  </code></pre>
  
  <p>And the same thing with the <code>or</code>. But in Julia, even using the <code>|</code> and <code>&amp;</code> operators, it doesn't seems to work, i.e.</p>
  
  <pre><code>t=0
  while s != 0 &amp; d &lt;= N
     t+=1
     something happens
  end
  </code></pre>
  
  <p>For the <code>&amp;</code> condition, I made it work by using an <code>if</code> with the <code>brake</code> condition i.e.</p>
  
  <pre><code>t=0
  while s != 0
    something happens
    t+=1
    if d&gt;N
      break
    end
  end
  </code></pre>
  
  <p>But I have no idea how to make it work for the <code>or</code>. </p>
  
  <p>If it can be done in a single line, even better.</p>