mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
Migrate to DocumentationMarkup elements GitOrigin-RevId: ea4d71638b1dd3a160521e655fd2a1670ea27701
15 lines
2.1 KiB
HTML
15 lines
2.1 KiB
HTML
<html><body><div class="content"><div class="section" id="the-if-statement">
|
|
<span id="else"></span><span id="elif"></span><span id="if"></span><h2>The <a class="reference internal" href="#if"><tt class="xref std std-keyword docutils literal"><span class="pre">if</span></tt></a> statement</h2>
|
|
<p id="index-3">The <a class="reference internal" href="#if"><tt class="xref std std-keyword docutils literal"><span class="pre">if</span></tt></a> statement is used for conditional execution:</p>
|
|
<pre>
|
|
<strong id="grammar-token-if_stmt">if_stmt</strong> ::= "if" <a class="reference internal" href="expressions.html#grammar-token-expression"><tt class="xref docutils literal"><span class="pre">expression</span></tt></a> ":" <a class="reference internal" href="#grammar-token-suite"><tt class="xref docutils literal"><span class="pre">suite</span></tt></a>
|
|
( "elif" <a class="reference internal" href="expressions.html#grammar-token-expression"><tt class="xref docutils literal"><span class="pre">expression</span></tt></a> ":" <a class="reference internal" href="#grammar-token-suite"><tt class="xref docutils literal"><span class="pre">suite</span></tt></a> )*
|
|
["else" ":" <a class="reference internal" href="#grammar-token-suite"><tt class="xref docutils literal"><span class="pre">suite</span></tt></a>]
|
|
</pre>
|
|
<p>It selects exactly one of the suites by evaluating the expressions one by one
|
|
until one is found to be true (see section <a class="reference internal" href="expressions.html#booleans"><em>Boolean operations</em></a> for the definition of
|
|
true and false); then that suite is executed (and no other part of the
|
|
<a class="reference internal" href="#if"><tt class="xref std std-keyword docutils literal"><span class="pre">if</span></tt></a> statement is executed or evaluated). If all expressions are
|
|
false, the suite of the <a class="reference internal" href="#else"><tt class="xref std std-keyword docutils literal"><span class="pre">else</span></tt></a> clause, if present, is executed.</p>
|
|
</div>
|
|
</div></body></html> |