Short-circuit evaluation: Difference between revisions

Content added Content deleted
(Add Ecstasy example)
Line 1,181: Line 1,181:


=={{header|Ecstasy}}==
=={{header|Ecstasy}}==
Similar to Java, Ecstasy uses the `&&` and `||` operators for short-circuiting logic, and `&` and `|` are the normal (non-short-circuiting) forms.
Similar to Java, Ecstasy uses the <span style="background-color: #e5e4e2">&nbsp;&amp;&amp;&nbsp;</tt></span> and <span style="background-color: #e5e4e2"><tt>&nbsp;||&nbsp;</tt></span> operators for short-circuiting logic, and <span style="background-color: #e5e4e2"><tt>&nbsp;&amp;&nbsp;</tt></span> and <span style="background-color: #e5e4e2"><tt>&nbsp;|&nbsp;</tt></span> are the normal (non-short-circuiting) forms.


<syntaxhighlight lang="java">
<syntaxhighlight lang="java">