title: In Objective-C, how to test against macro definition value?
body: <p>I'd like to use</p>
  
  <pre><code>#define IS_APP_FULL_VERSION NO
  </code></pre>
  
  <p>and the code</p>
  
  <pre><code>isAppFullVersion = IS_APP_FULL_VERSION;
  </code></pre>
  
  <p>to set instance variable.  But is there a way to also do</p>
  
  <pre><code>#if IS_APP_FULL_VERSION == "NO"
  
  // add some methods here
  
  #endif
  </code></pre>
  
  <p>but it would give a compile error, and so is <code>#if (IS_APP_FULL_VERSION == "NO")</code>.  Is there a way to check it against <code>YES</code> and <code>NO</code>?  (check against the substitution value)</p>
  
  <hr>
  
  <p><strong>Update:</strong> it seems like <code>&gt;</code> and <code>== 0</code> is allowed, such as</p>
  
  <pre><code>#if IS_APP_FULL_VERSION == 0
  </code></pre>
  
  <p>so we can actually use <code>0</code> and <code>1</code> for false and true, and use <code>== 1</code> to test, but it will be better if <code>YES</code> and <code>NO</code> can be used.</p>
  
  <hr>
  
  <p><strong>Update 2:</strong> </p>
  
  <p>One possible solution turns out to be:</p>
  
  <pre><code>#define IS_APP_FULL_VERSION  1
  
  #if IS_APP_FULL_VERSION
  
  // add some methods here
  
  #endif
  
  isAppFullVersion = IS_APP_FULL_VERSION;
  </code></pre>
  
  <p>will all work, and we can just change <code>1</code> to <code>0</code> to toggle the code.</p>