문제

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