Erik de Castro Lopo wrote:
Ruby also lets you do this, as the 'if' statement is an expression. Eg, in Ruby:4/ Ocaml lets you set a value based on the result of an if statment.
x = if remainder > 2 then
5
else
0
end
Ruby also lets you put the if after the assignment. Eg,
x = 0
.....
x = 5 if remainder > 2
Cheers, James _______________________________________________ coders mailing list [email protected] http://lists.slug.org.au/listinfo/coders
