Hi,
What is the operator to calculate the difference between 2 numbers?
For example
Value 1 = -250
Value 2 = 250
Difference in numbers equals 500 etc..
Sorry if this is a dumb question but I have not had to do it before !
Difference between 2 numbers
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10058
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Difference between 2 numbers
The key may be the abs (absolute) function:
put abs( tVal1 - tVal2)
[We have a momentary limit on the server in which it requires a minimum of 100 chars, so this sentence is just filler; please ignore]
put abs( tVal1 - tVal2)
[We have a momentary limit on the server in which it requires a minimum of 100 chars, so this sentence is just filler; please ignore]
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn