PDA

View Full Version : Math Function Question


mystica
05-28-2009, 11:26 AM
Does anyone know how to code a simple subtraction-routine?

eg. Application performs Sting.ToNumber and stores the resulting variables as say, 10 and 7. How can I get it to then perform a subtraction-routine on these two numbers, so that that the result (ie. 3) is then held as the resulting variable?

mystica
05-28-2009, 11:35 AM
Do-h! Found it ... knew I was asking a dumb and obvious question.

Why is it that sometimes our brains go into meltdown and miss the painfully obvious?

Bruce
05-28-2009, 10:17 PM
Please be sure to share you light bulb moment with the others who may not know how to do it. Thx ;)

MicroByte
05-29-2009, 05:24 AM
nTen=10
nSevern=7
nResult=(nTen-nSevern)

nResult contains (3)

its only easy when you know how, and Bruce is right, it helps others to if there is a answer when they search out your post 1 year from now with the same question


Why is it that sometimes our brains go into meltdown and miss the painfully obvious?

lol, yeah, every day!

mystica
05-30-2009, 11:18 AM
A fair point ... will keep this in mind for next time. Thanks for the example-code of what I was talking about, MicroByte.