Question

Anyone knows how to do this?:

say 'something'
or 
say 'something'
or 
say 'something'

I want to choose randomly between these say commands. How to do that?

Was it helpful?

Solution

/* REXX */    
x = RANDOM(1,3)
       Select
         when x = 1 then
            say 'something'
         when x = 2 then do
            say 'something'
         Otherwise
            say 'something'
       end  /* Select */
 Pull answer .
 if answer='NO' then say 'Answer is NO.'

OTHER TIPS

I would suggest using the Random function and a Select statement.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top