Reputation: 259
I want to use if (condition) then Statement 1 , statement 2, ... else statement 1, statement 2,... ; in SML Programming Language. I could not use and, simple space or ,. Any suggestions if this is possible at all? note: I do not mean nested if else. It is pretty clear though.
Upvotes: 3
Views: 7072
Reputation: 370162
You can use the construct (expr1; expr2; ... ; exprn)
to execute multiple expressions sequentially. So:
if condition then (
expression1;
expression2
) else (
expression1;
expression2
)
Upvotes: 9