This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
If you look at the entire first paragraph of 15.14.1 and the entire first paragraph of 15.15.1, you find that they are nearly identical - the only difference is that the word "prefix" is replaced with "postfix". You are comparing two quotes from different positions in the paragraphs, without looking carefully at the exact wording. No need to look at two different sections to get those sentences - you can find nearly the same sentences you cited within the same paragraph at the beginning of 15.14.1
A postfix expression followed by a ++ operator is a postfix increment expression. The result of the postfix expression must be a variable of a numeric type, or a compile-time error occurs. The type of the postfix increment expression is the type of the variable. The result of the postfix increment expression is not a variable, but a value.
The key difference between the two sentences in red is that the first refers to a posfix expression, while the second refers to a postfix increment expression. Look again at the very first sentence of the quote - those are two different things. In the case of "x++", "x" by itself is a postfix expression, and "x++" is a postfix increment expression. So "x" must be (and is) a variable of numeric type, and "x++" is not a variable, but a value. Clear?
[This message has been edited by Jim Yingst (edited November 10, 2000).]
Jim I removing my rattling post in the light of what you have said. Subha
Joined: Sep 23, 2000
Well first of all let me thank you for clearing my doubt. I had posted the same question on certification forum but nobody noticed it. I must admit that I was not very careful while reading that section. But my longstanding doubt has been cleared, so I must thank Jim again.