Conditional structures: Difference between revisions

Content added Content deleted
(Add Seed7 example)
Line 913: Line 913:
=={{header|Fancy}}==
=={{header|Fancy}}==
Fancy has no built-in conditional structures. It uses a combination of polymorphism and blockliterals (closures) to achieve the same thing (like Smalltalk).
Fancy has no built-in conditional structures. It uses a combination of polymorphism and blockliterals (closures) to achieve the same thing (like Smalltalk).

===if:then:===
<lang fancy>if: (x < y) then: {
"x < y!" println # will only execute this block if x < y
}
</lang>

===if:then:else::===
<lang fancy>if: (x < y) then: {
"x < y!" println # will only execute this block if x < y
} else: {
"x not < y!" println
}
</lang>



===if_true:===
===if_true:===