From 6561753999428051374
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,13ce76b24fcf616c
X-Google-Attributes: gidf78e5,public
From: Ron Natalie <ron@sensor.com>
Subject: Re: Operator precedence
Date: 1999/12/29
Message-ID: <3868DE6D.5C90C109@sensor.com>#1/1
X-Deja-AN: 565911513
Content-Transfer-Encoding: 7bit
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <3868B1A1.D47627B4@kobasoft.nl>
X-Original-Date: Tue, 28 Dec 1999 10:59:41 -0500
X-Accept-Language: en
Content-Type: text/plain; charset=x-user-defined
X-Complaints-To: news@news.unimelb.edu.au
X-Trace: ariel.ucs.unimelb.edu.au 946439370 2727 128.250.37.153 (29 Dec 1999 03:49:30 GMT)
Organization: Sensor Systems
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUAOGmE8+EDnX0m9pzZAQHdPwGAoBwOfsQ6oVv7bbrS706MFobUahn6MvBv qMUfxdBJN6Rq7iHM3yoymIlqCq+LkmJN =nUMR
Mime-Version: 1.0
NNTP-Posting-Date: 29 Dec 1999 03:49:30 GMT
Newsgroups: comp.std.c++

Pieter van Beek wrote:
> 
> Hi all,
> 
> There seems to be no operator precedence table in de ansi C++ standard.
> I always used the one from Stroustrup, and only found out yesterday this
> topic is not covered by the standard.
> 
> AIMS?
> 

Precedence is not defined by that table, even in C, it is implied by
the language grammar.  The inclusion of the table in K&R and Stroustrup
is purely informational.  Note the comment from Stroustrup at the bottom
of page 121:
	A few grammar rules cannot be expressed in terms of precedence
	(also known as binding strength) and associativity.

This has lead to some confusion with the ?: operator interpretation.
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



