Author Topic: New to Small Integer usage  (Read 2673 times)

Mike308

  • Newbie
  • *
  • Posts: 48
New to Small Integer usage
« on: February 11, 2017, 10:35:19 PM »
I've just read the manual on this twice and searched this forum for "small integer" and still am just a tad befuddled. I'm hoping for a pointer to get me back on track.

I can set up a user statement that says "Lets talk about..." that ends with five choices. Lets say Cats, Dogs, Horses, etc. and depending on which one I say, I set a Small Integer to the correspoonding value, 1-5. No prob.

What I want to be able to do is then ask a question common to all five, like how big are they, or what do they eat, and have the appropriate TTS answer come back based on the small integer. I see on p46 of the manual how to set a Condition (small integer) block, but I don't see how I correlate the last step; i.e. if SmallInteger=1 give the first answer, if 2 give the second. I think I'm missing the forest for the trees, and would appreciate some clarity.

Thanks.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: New to Small Integer usage
« Reply #1 on: February 11, 2017, 10:57:11 PM »
You use the "Begin a Conditional (If Statement) Block" action:
Code: [Select]
Begin Small Integer Compare : [SmallInteger] Equals 1
    Say, 'First answer'
Else If Small Integer Compare : [SmallInteger] Equals 2
    Say, 'Second answer'
Else If Small Integer Compare : [SmallInteger] Equals 3
    Say, 'Third answer'
Else If Small Integer Compare : [SmallInteger] Equals 4
    Say, 'Fourth answer'
Else If Small Integer Compare : [SmallInteger] Equals 5
    Say, 'Fifth answer'
Else
    Say, 'None of the above answer'
End Condition

Page 50 of VoiceAttackHelp.pdf.

Mike308

  • Newbie
  • *
  • Posts: 48
Re: New to Small Integer usage
« Reply #2 on: February 11, 2017, 11:35:21 PM »
Ah! And there it is. Clouds part, angels sing....

Thank you, you've made my day.