Pregunta

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?

¿Fue útil?

Solución

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

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top