Conditional structures: Difference between revisions
Content added Content deleted
imported>J7M (Add example for SmallBASIC) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
Line 8,626: | Line 8,626: | ||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
The ''if/else'' statement and the ''ternary operator (?:)'' are Wren's basic conditional structures though it can be argued that the ''&&'' and ''||'' operators, which do short-circuit evaluation, should be included under this heading as well. |
The ''if/else'' statement and the ''ternary operator (?:)'' are Wren's basic conditional structures though it can be argued that the ''&&'' and ''||'' operators, which do short-circuit evaluation, should be included under this heading as well. |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">for (b in [true, false]) { |
||
if (b) { |
if (b) { |
||
System.print(true) |
System.print(true) |