title: How can I check if two cells are equal in brainf*ck?
body: <p>How can I check if the value in cell #0 is equal to the value in cell #1?  I am trying to write code equivalent to:</p>
  
  <pre><code>if(a == b)
  {
      //do stuff
  }
  else
  {
      //do something else
  }
  </code></pre>
  
  <p>I have read <a href="https://stackoverflow.com/questions/6168584/brainfuck-compare-2-numbers-as-greater-than-or-less-than">Brainfuck compare 2 numbers as greater than or less than</a>, and the second answer gave me a general idea of what I'd need to do, but I cannot figure it out.  (That solution gives <code>if a &lt; b, else</code>.)</p>
  
  <p>I am thinking I need to do something along the lines of decrementing both values, and if they reach 0 at the same time, then they are true.  But I keep getting stuck at the same exit point every time I think about it.</p>
  
  <p>How can I check if two cells are equal in brainfuck?</p>