Re: precedence
From: Francis Glassborow (francis_at_robinton.demon.co.uk)
Date: 09/15/04
- Next message: Francis Glassborow: "Re: questions of unsigned int, function prototypes"
- Previous message: AB: "Tips on gaining proficiency in C"
- In reply to: Gary Labowitz: "Re: precedence"
- Next in thread: Karl Heinz Buchegger: "Re: precedence"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 15 Sep 2004 09:52:15 +0100
In article <MoOdnel-ku5oE9rcRVn-hw@comcast.com>, Gary Labowitz
<glabowitz@comcast.net> writes
>What ever happened to common sense? The table is supposed to help apply
>common sense.
But this is an example of why precedence tables are only an
approximation, you have to know and understand the grammar.
It is easy for even the world's best to get caught. The very first
printing of The C++ Programming Language 3rd ed. had a misleading in its
precedence table. The conditional operator (? :) cannot be placed
correctly in such a table because of conflict with the precedence of
assignment expressions.
The upshot is that any precedence table for C++ operators has to be
treated as a guide rather than as definitive.
-- Francis Glassborow ACCU Author of 'You Can Do It!' see http://www.spellen.org/youcandoit For project ideas and contributions: http://www.spellen.org/youcandoit/projects
- Next message: Francis Glassborow: "Re: questions of unsigned int, function prototypes"
- Previous message: AB: "Tips on gaining proficiency in C"
- In reply to: Gary Labowitz: "Re: precedence"
- Next in thread: Karl Heinz Buchegger: "Re: precedence"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|