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?

有帮助吗?

解决方案

/* 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.'

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top