मैं थोड़ा सा भरता हूं।
मानक सशर्त ऑपरेटर शब्द का उपयोग करता है।
Syntax
conditional-expression: logical-OR-expression logical-OR-expression? expression : conditional-expression
सशर्त अभिव्यक्ति एक lvalue उपज नहीं है। इसके अलावा; Wikipedia; Conditional
नोट: यानी .: सी ++ है:
तार्किक या अभिव्यक्ति?अभिव्यक्ति: काम -expression
Constraints:
* The first operand shall have scalar type[1].
* One of the following shall hold for the second and third operands:
— both operands have arithmetic type[2];
— both operands have the same structure[3] or union type[4];
— both operands have void type[5];
— both operands are pointers to qualified or unqualified[6] versions of compatible
types[7];
— one operand is a pointer and the other is a null pointer constant[8]; or
— one operand is a pointer to an object or incomplete type[9] and the other
is a pointer to a qualified or unqualified version of void.
फुट भोजन:
[1] Scalar type : Arithmetic types and pointer types.
[2] Arithmetic type : Integer and floating types.
[3] Structure type : A sequentially allocated nonempty set of member objects (and, in
certain circumstances, an incomplete array), each of which has an
optionally specified name and possibly distinct type.
[4] Union type : An overlapping nonempty set of member objects, each of which has
an optionally specified name and possibly distinct type.
[5] Void type : An empty set of values; it is an incomplete type that cannot be
completed.
[6] Qualified type : 1998 (const and volatile), 1999 (restrict), respectively
2011 (_Atomic). *
[7] Compatible type : Their types are the same.
[8] Null ptr. const.: NULL; implementation-defined null pointer constant.
[9] Incomplete type : Types that describe objects but lack information needed to determine
their sizes.
*Type qualifiers in C
तो: उपयोग करने के लिए बुद्धिमान नहीं।
सिंटैक्स की तरह [ग्रोवी] (http://en.wikipedia.org/wiki/Groovy_%28programming_language%29) की तरह दिख रहे हैं। – Lion