On 10 Aug 2012, at 7:48 AM, Koen van der Drift <koenvanderdr...@gmail.com> 
wrote:

> On Fri, Aug 10, 2012 at 8:42 AM, Keary Suska <cocoa-...@esoteritech.com> 
> wrote:
>> 
> 
>> Where in the predicate formatting guide 
>> (https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Predicates/predicates.html)
>>  does it show that your syntax is in any way valid?
> 
> Well, it talks about using the greater than comparator in the Using
> Predicates section:
> 
> NSDate *referenceDate = [NSDate dateWithTimeIntervalSince1970:0];
> NSPredicate *predicate = [NSPredicate predicateWithFormat:@"birthday >
> %@", referenceDate];

Notice two differences between the documented example and the predicate you 
propose:

- The format specification in the example is %@, not a scalar. ("%@ is a var 
arg substitution for an object value—often a string, number, or date.")

- The predicate in the documentation does not chain binary comparisons. The 
documentation doesn't show any operator precedence — even if legal, your 
proposal might be read as [[%f < value] < %f]. It _does_ show a "BETWEEN" 
operator.

        — F


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to