www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - operator precedence

reply strtr <strtr spam.com> writes:
Are D's operator precedence rules the same as C's?

http://www.difranco.net/cop2220/op-prec.htm 

Couldn't find such a table on the D website.
Apr 09 2010
next sibling parent bearophile <bearophileHUGS lycos.com> writes:
strtr Wrote:

 Are D's operator precedence rules the same as C's?
http://www.digitalmars.com/d/1.0/overview.html Compatibility Operator precedence and evaluation rules D retains C operators and their precedence rules, order of evaluation rules, and promotion rules. This avoids subtle bugs that might arise from being so used to the way C does things that one has a great deal of trouble finding bugs due to different semantics. But there are new operators, like ^^ Bye, bearophile
Apr 10 2010
prev sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Sat, 10 Apr 2010 01:56:32 -0400, strtr <strtr spam.com> wrote:

 Are D's operator precedence rules the same as C's?

 http://www.difranco.net/cop2220/op-prec.htm

 Couldn't find such a table on the D website.
I had the same issue early on. The operator precedence is embedded in the grammar. Hopefully TDPL will contain a table. -Steve
Apr 11 2010