ISO/IEC 9,899:2011 clause 6.5--expression

Source: Internet
Author: User

6.5 Expressions


1, an expression is a sequence of operators and operands, these operators and operands specify a value calculation, or assign an object or a function, or generate side effects, or do a combination of the above operations. The order of the values of the operands of an operator is ranked before the value of the result of the operator is computed. [ Translator Note : for example,

int a = (5) * (6);

For the above expression, for the * operator, the calculation of the operands of the left and right sides of the multiplication operator is computed, and the result of the multiplication operation is computed.

2, if the side effects on a scalar object are computed with respect to another different side effect on the same scalar object or a value using the same scalar object, the behavior is undefined if it is not pre-ordered. If an expression has more than one order of permissible sub-expressions, then the behavior is undefined if the side effect of such an order occurs in any order. [Note: The following code describes a statement expression that is not defined:

1 ; a[i+ +] = i;

The following are allowed:

1= i;

3. The combination of the operator and the operand is specified by the syntax. [Note: The syntax specifies the precedence of an operator in an expression calculation, which is the same as the order of the main sub-clauses of the clause, and the highest priority is first introduced. Thus, for example, an expression that is allowed as a binocular operator + (6.5.6) is the expression defined in 6.5.1 to 6.5.6.  The exception is a cast expression (6.5.4) as the operand of the single-mesh operator (6.5.3) and one of the operands that follows one of the following operator pairs: the parentheses () (6.5.1) used as a combination, and the subscript brackets []  (6.5.2.1), function call parentheses () (6.5.2.2), and conditional operators ? : (6.5.15). In each main clause, the operator has the same precedence. The left or right binding is indicated in each sub-clause by the syntax used for the expression discussed in the inside. ] In addition to those specified later, the side effects and the values of the sub-expressions are not sequenced in order. [Note: In an expression, the expression is executed several times during the execution of a program, and there is no sequential order, and the calculation of its subexpression has an indeterminate sequence, and the expression does not need to be consistent in different calculations. ]

4.

ISO/IEC 9,899:2011 clause 6.5--expression

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.