Hi,

I'm hopeing someone can offer some insight into the following
problem: I'm working on a behaviour that makes a random sum,
eg. 7 + 3 - 2 = 8. I've managed to put random numbers into their
places and do the calculation by hard coding the operators.

How can I set-up a list that generates random operators and then 
inserts them into gmyTotal to replace the hard coded versions?

This is what I have so far:


global gmyTotal

on makeSum
  
  set valueOne = string(random(10))
  set valueTwo = string(random(10))
  set valueThree = string(random(10))

  set gmyTotal to integer(valueOne + valueTwo - valueThree)
  
  
  set the text of field "display1" to string(valueOne)
  set the text of field "display2" to string(valueTwo)
  set the text of field "display3" to string(valueThree)
  set the text of field "total" to string(gmyTotal)
  
end makeSum


Thanks, Dion.



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to