2

I tried looking for the ternary operator in the NSExpression documentation, but I couldn't find anything. I ended up finding an obscure reference in a 3rd party website to a TERNARY function, so I tried it out and sure enough, it worked.

Had I not found this reference and tried the function myself, I would have believed that NSExpression simply doesn't support this function.

To prevent something like that from happening again in the future with a different function, is there any way to find out the exhaustive list of functions / operators / syntax that NSExpression (and NSPredicate) supports so that I can learn about its full functionality?

Senseful
  • 86,719
  • 67
  • 308
  • 465
  • The list of expression types is here: [NSExpression.ExpressionType](https://developer.apple.com/documentation/foundation/nsexpression/expressiontype). You can also look at the initializers of `NSExpression`. – Willeke Jul 18 '22 at 12:20
  • Unbelievable that this doesn’t seem to exist! I can’t find anything from Apple on even long supported functions or even what math operators are supported! – David H Dec 16 '22 at 13:21

0 Answers0