If I remember my COBOL right, can’t you execute a number of instructions
to a period and call that a sentence? You’ll find most languages
after the '70s (exception: Basic) had more clearly delineated blocks
associated with conditionals instead of the concept of sentences.
The paradigm is:
do something else
elseif x== 1
do something with x
I think the elseif may be what you are looking for. Consider using the
when 1 then puts “a partridge in a pear tree”
when 2 then puts “two turteldoves…”
else puts “that’s all, folks”
These constructs take you away from the “goto” flow of control that
procedural languages relied so heavily on.
View this message in context:
Sent from the RubyOnRails Users forum at Nabble.com.