Anonymous user
Conditional structures: Difference between revisions
Added Scala
m (→{{header|Logo}}: link UCB Logo) |
(Added Scala) |
||
Line 3,515:
EXPRL is a single expression or a comma-separated list of exressions. The expressions must evaluate to comparable objects (the method <code>is_eq</code> must be implemented)
=={{header|Scala}}==
[[Category:Scala Implementations]]
{{libheader|Scala}}
<lang Scala> if (n == 12) "twelve" else "not twelve"
today match {
case Monday =>
Compute_Starting_Balance;
case Friday =>
Compute_Ending_Balance;
case Tuesday =>
Accumulate_Sales
case _ => {}
}</lang>
=={{header|Scheme}}==
|