36ee1e2015-10-12Pontus Östlund <!doctype html>
286efd2012-03-24Henrik Grubbström (Grubba) <html> <head>
36ee1e2015-10-12Pontus Östlund  <meta content="width=device-width, initial-scale=1" name="viewport"> <meta charset="utf8">
286efd2012-03-24Henrik Grubbström (Grubba)  <title>Pike Reference Manual - #if</title>
36ee1e2015-10-12Pontus Östlund  <!-- 83 --> <link rel='stylesheet' href='../../style.css'> <script src='../../site.js'></script>
286efd2012-03-24Henrik Grubbström (Grubba)  <style type='text/css'> svg line { stroke:#343434; stroke-width:2; } svg text { fill:#343434; } svg a { fill:#0768b2; text-decoration: underline; } </style> </head>
36ee1e2015-10-12Pontus Östlund  <body>
286efd2012-03-24Henrik Grubbström (Grubba)  <header>
36ee1e2015-10-12Pontus Östlund  <div class="header"> <div id="version"><strong></strong></div> <a href="http://pike.lysator.liu.se/"> <span>Pike</span> </a>
286efd2012-03-24Henrik Grubbström (Grubba)  </div> </header>
36ee1e2015-10-12Pontus Östlund  <div id="page">
286efd2012-03-24Henrik Grubbström (Grubba)  <div class="navbar">
36ee1e2015-10-12Pontus Östlund  <nav> <div class="inner"> <a href='../../index.html'><b class='top head'>Top</b></a>
286efd2012-03-24Henrik Grubbström (Grubba) <a href='../../ex/cpp_3A_3A.html'><b class='head'>cpp::</b></a> <script></script> <noscript> <div class='sidebar'> <a href='../../ex/cpp_3A_3A/index.html'><b>Symbol index</b></a><br /> </div> </noscript>
36ee1e2015-10-12Pontus Östlund  </div> </nav>
286efd2012-03-24Henrik Grubbström (Grubba)  </div>
36ee1e2015-10-12Pontus Östlund  <div class="content"> <div class="navbox"> <nav> <div class="sidebar"> <a href="../../ex/cpp_3A_3A/_23error.html" class="prev"><span>&#10148;</span> #error</a> <a href="../../ex/cpp_3A_3A/_23ifdef.html" class="next">#ifdef <span>&#10148;</span></a> </div> </nav> </div> <div class="contentbox"> <article> <h1>Directive #if</h1>
286efd2012-03-24Henrik Grubbström (Grubba)  <hr /> <dl class='group--doc'> <dt class='head--type'><span class='homogen--type'>Directive</span> <span class='homogen--name'><b>#if</b></span> </dt> <dd><p><code class='directive'>#if</code></p></dd> <dt class='head--doc'>Description</dt> <dd class='body--doc'><p>The <a class='ms reference' href='../cpp_3A_3A.html'>#if</a> directive can evaluate simple expressions and, if the expression is evaluates to true, "activate" the code block that follows. The code block ends when an <a class='ms reference' href='../cpp_3A_3A.html'>#endif</a>, <a class='ms reference' href='../cpp_3A_3A.html'>#else</a>, <a class='ms reference' href='../cpp_3A_3A.html'>#elseif</a> or <a class='ms reference' href='../cpp_3A_3A.html'>#elif</a> block is encountered at the same nesting depth.</p> <p> The <a class='ms reference' href='../cpp_3A_3A.html'>#if</a> expressions may include defines, integer, string and float constants, <tt>?:</tt>, <tt>||</tt> and <tt>&amp;&amp;</tt> operations, <tt>~</tt>, <tt>^</tt>, <tt>!</tt>, <tt>|</tt> and <tt>&amp;</tt> operations, <tt>&lt;</tt>, <tt>&gt;</tt>, <tt>&lt;=</tt>, <tt>&gt;=</tt>, <tt>==</tt> and <tt>!=</tt> operations, <tt>+</tt>, <tt>-</tt>, <tt>*</tt>, <tt>/</tt>, <tt>&lt;&lt;</tt> and <tt>&gt;&gt;</tt> operations and paranthesis.</p> <p> Strings may also be indexed with the <tt>[]</tt> index operator. Finally there are three special "functions" available in <a class='ms reference' href='../cpp_3A_3A.html'>#if</a> expressions; <a class='ms reference' href='../cpp_3A_3A/defined.html'>defined()</a>, <a class='ms reference' href='../cpp_3A_3A/efun.html'>efun()</a> and <a class='ms reference' href='../cpp_3A_3A/constant.html'>constant()</a>.</p> </dd> <dt class='head--doc'>See also</dt> <dd class='body--doc'><p><a class='ms reference' href='../cpp_3A_3A.html'>#ifdef</a>, <a class='ms reference' href='../cpp_3A_3A.html'>#ifndef</a>, <a class='ms reference' href='../cpp_3A_3A.html'>#elif</a>, <a class='ms reference' href='../cpp_3A_3A.html'>#else</a>, <a class='ms reference' href='../cpp_3A_3A.html'>#endif</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>, <a class='ms reference' href='../cpp_3A_3A/efun.html'>efun()</a></p> </dd></dl>
36ee1e2015-10-12Pontus Östlund  </article> </div>
286efd2012-03-24Henrik Grubbström (Grubba)  </div> </div>
36ee1e2015-10-12Pontus Östlund  <footer> <div id="build-date">Extracted from <strong></strong> as of <strong></strong>.</div> </footer>
286efd2012-03-24Henrik Grubbström (Grubba)  </body> <script>PikeDoc.current = {"link":"ex/cpp_3A_3A/_23if.html","name":"#if"};</script> <script src='../../ex/cpp_3A_3A/index.js'></script> <script src='../../ex/cpp_3A_3A/load_index.js'></script> </html>