Alright... basically, I want something like this:
(15 - 30) + 5
...to come out as a final value of 5. Obviously, it will give me -10. Is there a way to discount that which is in parentheses if it's under 0 while keeping it all as one expression?

Alright... basically, I want something like this:
(15 - 30) + 5
...to come out as a final value of 5. Obviously, it will give me -10. Is there a way to discount that which is in parentheses if it's under 0 while keeping it all as one expression?
Well, if in the final application the values come from counters or objects, just don't make that formula if the right number in the paranthesis is larger than the left...?

I know I can do that, I was more curious than anything-- although I do have to go back and edit 100 or so events in that case.
Hi there,
if I am understanding you correctly, yes you can do a conditional like that... using the Immediate If object (which I will call IIF for the purposes of keeping this compact)
simply use the following:
CompareIntegers( "IIF", (15-30), "<", 0, 5, (15-30)+5)
This is the "compare integers" -> "return an integer" expression of the object.
The first argument (after the object name "IIF") is the number to test (15-30), the second is "<" the test to perform, the third is the test variable (0), the fourth is the number to be returned if the test is True [ie. (15-30) is < 0] and the fifth is the number returned if the test is False.
That should about do it, providing I've not misunderstood your question of course! <img src="/center/images/graemlins/smile.gif" alt="" />
[]Alright... basically, I want something like this:
(15 - 30) + 5
...to come out as a final value of 5. Obviously, it will give me -10. Is there a way to discount that which is in parentheses if it's under 0 while keeping it all as one expression? [/]

Thanks, but is the Immediate If object available for MMF2 though? It doesn't seem to be.
I'll just do it the old fashioned way.
[]Alright... basically, I want something like this:
(15 - 30) + 5
...to come out as a final value of 5. Obviously, it will give me -10. Is there a way to discount that which is in parentheses if it's under 0 while keeping it all as one expression? [/]
Wait! There is an easier way of doing this!
Max(15-30, 0) + 5
There ya go ^_^

Aww, read Walrus's reply too late. <img src="/center/images/graemlins/frown.gif" alt="" /> Good to know for the future, though.
[]Aww, read Walrus's reply too late. <img src="/center/images/graemlins/frown.gif" alt="" /> Good to know for the future, though. [/]
lol <img src="/center/images/graemlins/tongue.gif" alt="" />
Well also keep in mind that there is a Min() function too!
Yes, IIF is indeed available free from the Bumderland website at: http://www.bumderland.com/objects/index.html
I forgot about max & min there! <img src="/center/images/graemlins/smile.gif" alt="" />







lol <img src="/center/images/graemlins/tongue.gif" alt="" />
Max() and Min() are a really basics functions...
Besides, IIF is available for MMF2 but, use it only if it's required <img src="/center/images/graemlins/wink.gif" alt="" />