Anonymous user
Conditional structures: Difference between revisions
m
→{{header|Retro}}: update for retro-11.0
m (→generic-inline-conditional: changed "works with" tag) |
m (→{{header|Retro}}: update for retro-11.0) |
||
Line 2,363:
=={{header|Retro}}==
===if
<lang Retro>( condition ) [ ( true statements ) ] ifTrue
( condition ) [ ( false statements ) ] ifFalse
( condition ) [ ( true statements ) ] [ ( false statements ) ]
These forms can be used interactively, or inside function definitions.
===when===
<lang Retro>: foo ( n- )
[ 1 = ] [ drop ( if quote evaluates to true ) ] when
[ 2 = ] [ drop ( if quote evaluates to true ) ] when
[ 3 = ] [ drop ( if quote evaluates to true ) ] when
drop ( default action ) ;
=={{header|REXX}}==
|