Saturday, November 29, 2008

select keyword in rexxx

SELECT keyword in REXX is like switch case keyword used in c. This keyword allows to select one of the conditional expressions.

syntax :
select
when cond1 then …
when cond2 then …
otherwise …
end

example :
/*rexx*/
number = 100
select
when number < 5 then say "less than 5" /*condition not sastisfied.this statement will not get executed*/
when number < 50 then say "less than 50" /*condition not sastisfied.this statement will not get executed*/
otherwise say "it should be greater than 50" /*condition sastisfied.this statement will get executed*/

end

No comments:

Computers Add to Technorati Favorites Programming Blogs - BlogCatalog Blog Directory