="section-">

<div>
This is an old version, <a href="https://mc-stan.org/docs/stan-users-guide/style-guide.html#conditionals">view current version</a>.
</div>
<div id="conditionals" class="section level2">
<h2><span class="header-section-number">24.7</span> Conditionals</h2>
<p>Stan supports the full C++-style conditional syntax,
allowing real or integer values to act as conditions, as follows.</p>
<pre><code>real x;
...
if (x) {
   // executes if x not equal to 0
   ...
}</code></pre>
<div id="explicit-com