控制流 / 条件语句 / if/else 语句

int latitude = 90;

//the ternary chain works as an
//if-expression
NSString *location =
    latitude == 0 ? @"Equator" :
    latitude == 90 ? @"north Pole" :
    latitude == -90 ? @"south Pole" :
    @"not at the Equator or Pole";
//location is "north Pole"