6f5f61 | 2018-09-12 | Henrik Grubbström (Grubba) | | </div>
</nav>
</div>
<div class="contentbox">
<article>
<h1>Directive #elseif</h1>
<hr />
<dl class='group--doc'>
<dt class='head--type'><span class='homogen--type'>Directive</span>
<span class='homogen--name'><b>#elseif</b></span>
</dt>
<dd><p><code class='directive'>#elif</code><br>
<code class='directive'>#elseif</code></p></dd>
<dt class='head--doc'>Description</dt>
<dd class='body--doc'><p>These work as a combined <a class='ms reference' href='../cpp_3A_3A.html'>#else</a> and <a class='ms reference' href='../cpp_3A_3A.html'>#if</a> without
adding an extra level of nesting.</p>
</dd>
<dt class='head--doc'>Example</dt>
<dd class='example'><pre><p>The following two are equivalent:</p>
<pre><code>#ifdef A
// Code for A.
#else
#ifdef B
// Code for B.
#else
#ifdef C
// Code for C.
#else
// Code for D.
#endif
#endif
#endif</code></pre><p>And</p>
<pre><code>#ifdef A
// Code for A.
#elif defined(B)
// Code for B.
#elseif defined(C)
// Code for C.
#else
// Code for D.
#endif</code></pre>
</pre></dd>
<dt class='head--doc'>See also</dt>
<dd class='body--doc'><p><a class='ms reference' href='../cpp_3A_3A.html'>#if</a>, <a class='ms reference' href='../cpp_3A_3A.html'>#ifdef</a>, <a class='ms reference' href='../cpp_3A_3A.html'>#else</a>, <a class='ms reference' href='../cpp_3A_3A/defined.html'>defined()</a>, <a class='ms reference' href='../cpp_3A_3A/constant.html'>constant()</a></p>
</dd></dl>
</article>
</div>
</div>
</div>
<footer>
<div id="build-date">Extracted from <strong data-id="version"></strong> as of <strong data-id="date" data-timestamp=""></strong>.</div>
</footer>
<script>PikeDoc.current = {"link":"ex/cpp_3A_3A/_23elseif.html","name":"#elseif"};</script>
<script src='../../ex/cpp_3A_3A/index.js'></script>
<script src='../../ex/cpp_3A_3A/load_index.js'></script>
<script>
// Tell PikeDoc that next actions are from loaded scripts
PikeDoc.isInline = false;
</script>
</body>
</html>
|