The old way, 'reverse polish notation', was abandoned along with the file
format change to .fp7. In rpn, it is true that evaluation continued even
after a true expression was found, but that is no longer the case.
John Weinshel
Datagrace
Vashon Island, WA
(206) 463-1634
Member, FileMaker Business Alliance
Certified For FileMaker 8
Certified For FileMaker 7
-----Original Message-----
From:
[hidden email]
[mailto:
[hidden email]] On Behalf Of Bart
Bartholomay
Sent: Thursday, July 03, 2008 7:01 PM
To:
[hidden email]
Subject: Re: Can If handle range of numbers
If this is true, I wasn't aware of it. It certainly didn't used to be
true.
Bart
On Jul 3, 2008, at 9:30 PM, Bruce Robertson wrote:
> I don't think so.
>
> I think they've made it very clear that the expression "short
> circuits" and
> the entire expression is NOT evaluated.
>
> This has come up for instance in discussions of performance. If the
> second
> term of the expression were for example a sum across a million
> records, but
> the first expression is very simple and evaluates as true, then the
> calc
> result will be instant and the sum will not occur at all.
>
>> John's right, and the entire expression is evaluated whereafter FMP
>> selects the first test that's evaluated as meeting all the criteria.
>>
>> Bart
>>
>> On Jul 3, 2008, at 1:58 PM, John Kornhaus wrote:
>>
>>> Why include the second half of the second test at all?
>>>
>>>
>>> Case(
>>> OrderNum > 800; Price * .025;
>>> OrderNum > 500; Price * .01;
>>> 0
>>> )
>>>
>>> Remember that "The Case function evaluates each test expression in
>>> order, and when a True expression is found, returns the value
>>> specified in result for that expression."
>>>
>>> The first test will catch any values greater than 800, so the second
>>> test only has to catch the values greater than 500 since only values
>>> less than or equal to 800 were left over from the first test.
>>>
>>> As a personal preference, I also consider it good practice to return
>>> a default value appropriate to the type being returned by the other
>>> result expressions. In this case, the result should be numeric, so I
>>> have chosen to return a zero rather than an empty text string.
>>>
>>> John
>>>
>>>
>>>
>>> On Jul 3, 2008, at 12:38 PM, Beverly Voth wrote:
>>>
>>>> OOPs, Colm. What about OrderNum = 800?
>>>>
>>>>
>>>> Case (
>>>> OrderNum > 800 ; Price * 2.5 / 100 ;
>>>> OrderNum > 500 and OrderNum <= 800 ; Price * 1 / 100 ;
>>>> ""
>>>> )
>>>>
>>>> Beverly
>
> _______________________________________________
> FMPexperts mailing list
>
[hidden email]
>
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au