Double inequalities in Objective C

math, objective-c

Solution

Nope - Objective-C is a superset of the C language, and uses the same syntax as C for `if` statements. You'll have to split that up into two inequalities: `if (x <= y && y <= z)`.

Problem

Is it possible to write double inequalities in an if-statement? ex: `if (x <= y <= z) do stuff;`

Original source