Conditional structures: Difference between revisions

Content added Content deleted
(added MiniScript example)
Line 5,124: Line 5,124:


=={{header|Retro}}==
=={{header|Retro}}==
===if, ifTrue, and ifFalse===
===choose, if, and -if===
<lang Retro>( condition ) [ ( true statements ) ] ifTrue
<lang Retro>condition [ true statements ] if
( condition ) [ ( false statements ) ] ifFalse
condition [ false statements ] -if
( condition ) [ ( true statements ) ] [ ( false statements ) ] if</lang>
condition [ true statements ] [ false statements ] choose</lang>


These forms can be used interactively, or inside function definitions.
These forms can be used interactively, or inside function definitions.