john19992010
Member
- Joined
- Jun 8, 2014
- Messages
- 5
- Programming Experience
- 1-3
Hi, this is my first post to the forums so i wasn't sure which thread section to post it in. My question is, i have a DLA (Digital Life Assistant ) program like JARVIS that generates random jokes, i want the user to speak and it reads out one of fifty jokes already programmed into it. Originally, I was using this code:
Case Is = "TELL ME A JOKE"
Select Case Number
Case Is = 1
Jarvis.speak(joke)
Case Is = 2
Jarvis.speak(joke)
Case Is = 3
Jarvis.speak(joke)
Case Is = 4
Jarvis.speak(joke)
and so on until fifty. i believed that the program would select a random case number and perform the code under it however i realised that this isn't in fact the right code but one for testing variables or something. Can someone help me please
Case Is = "TELL ME A JOKE"
Select Case Number
Case Is = 1
Jarvis.speak(joke)
Case Is = 2
Jarvis.speak(joke)
Case Is = 3
Jarvis.speak(joke)
Case Is = 4
Jarvis.speak(joke)
and so on until fifty. i believed that the program would select a random case number and perform the code under it however i realised that this isn't in fact the right code but one for testing variables or something. Can someone help me please