RosettaCodeData/Task/Conditional-structures/NetRexx/conditional-structures-2.netrexx
2023-07-01 13:44:08 -04:00

16 lines
402 B
Text

-- simple construct
select
when logicalCondition1 then condition1()
when logicalCondition2 then condition2()
otherwise conditionDefault()
end
-- set up a catch block to intercept missing OTHERWISE clause
do
select
when logicalCondition1 then condition1()
when logicalCondition2 then condition2()
end
catch ex1 = NoOtherwiseException
ex1.printStackTrace()
end