Conditional structures: Difference between revisions

Content added Content deleted
m (Fix the Dao example.)
Line 1,015: Line 1,015:
=={{header|Dao}}==
=={{header|Dao}}==
===If Elif Else===
===If Elif Else===
<lang dao>a = 3
<lang java>a = 3
if( a == 1 ){
if( a == 1 ){
io.writeln( 'a == 1' )
io.writeln( 'a == 1' )
}elif( a== 3 ){
}else if( a== 3 ){
io.writeln( 'a == 3' )
io.writeln( 'a == 3' )
}else{
}else{
Line 1,024: Line 1,024:
}</lang>
}</lang>
===Switch Case===
===Switch Case===
<lang dao>a = 3
<lang java>a = 3
switch( a ){
switch( a ){
case 0: io.writeln( 'case 0' )
case 0: io.writeln( 'case 0' )
case 1, 2: io.writeln( 'case 1,2' )
case 1, 2: io.writeln( 'case 1,2' )
case 3 ... 5: io.writeln( 'case 3...5' )
case 3, 4, 5: io.writeln( 'case 3,4,5' )
default: io.writeln( 'default' )
default: io.writeln( 'default' )
}</lang>
}</lang>

=={{header|Déjà Vu}}==
=={{header|Déjà Vu}}==
<lang dejavu>if a:
<lang dejavu>if a: