J
Josselin
In all examples I can see in my book about 'case ..' 'when..' 'then.. '
there is only one statement after the 'when..' I understand using
'then' if the statement is on the same line as 'when', BUT
can I write multiple statements after the 'when' ?
like that :
case 'a'
when 'a1'
puts..
puts ...
return
when 'a2'
puts ...
puts ...
puts ...
return
when 'a3' then puts ...
else
puts ...
puts ...
end
thansk fyh
there is only one statement after the 'when..' I understand using
'then' if the statement is on the same line as 'when', BUT
can I write multiple statements after the 'when' ?
like that :
case 'a'
when 'a1'
puts..
puts ...
return
when 'a2'
puts ...
puts ...
puts ...
return
when 'a3' then puts ...
else
puts ...
puts ...
end
thansk fyh