ruby控制结构之条件式
(2011-01-12 23:16)
分类: 编程札记
换行符和分号都可以作为expression和code的分隔符,但更建议使用then作为分隔符
方式一:
if expression
code
end
方式二:
if expression;code
end
方式三:
if expression then code
end
方式四:(推荐)
if expression then
code
end

