Conditional structures: Difference between revisions

Content added Content deleted
m (→‎SELECT--WHEN/OTHERWISE: changed REXX variable from '''a''' --> '''g'''. -- ~~~~)
Line 2,802: Line 2,802:
===SELECT--WHEN/OTHERWISE===
===SELECT--WHEN/OTHERWISE===
<lang rexx> select
<lang rexx> select
when a=='angel' then many='host'
when g=='angel' then many='host'
when a=='ass' | a=='donkey' then many='pace'
when g=='ass' | g=='donkey' then many='pace'
when a=='crocodile' then many='bask'
when g=='crocodile' then many='bask'
when a=='crow' then many='murder'
when g=='crow' then many='murder'
when a=='lark' then many='ascension'
when g=='lark' then many='ascension'
when a=='quail' then many='bevy'
when g=='quail' then many='bevy'
when a=='wolf' then many='pack'
when g=='wolf' then many='pack'
otherwise say
otherwise say
say '*** error! ***'
say '*** error! ***'
say a "isn't one of the known thingys."
say g "isn't one of the known thingys."
say
say
exit 13
exit 13