Learning to make programs

starpen

New Member
Hey guys.

So I'm learning to program ado's and I have a question. Say I want to make a random joke generator in stata from a list of 100 jokes. How do I make the program select a random statement from a list of statements? For example:

Code:
program define joke
version 14.0
dis as text "joke 1"
dis as text "joke 2"
end
How do I make it randomly select just one of the two?