Single or double equals (or no equals) for boolean criteria

Single or double equals (or no equals) for boolean criteria

Hi,

A fairly basic question but it would be great to have a definitive answer and I can't find one anywhere.

What is the correct format for boolean criteria for a conditional expression (like an if, or to select form data)? 

And does it matter which format you use? (Because it doesn't seem to make any difference when I test out the different versions).


A. One equals, e.g.
  1. FormData = Form[bool = true]
or e.g.
  1. if (bool = true) {<expression>;}


B. Two equals, e.g. 
  1. FormData = Form[bool == false]
or e.g. 
  1. if (bool == true) {<expression>;}

C. No equals, e.g. (I assume this only works for 'if true')
  1. FormData = [bool]
or e.g. 
  1. if (bool) {<expression>;}

Much appreciated,
Katherine