Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: glen herrmannsfeldt Newsgroups: comp.lang.java.programmer Subject: Re: Assigning void Date: Sun, 21 Oct 2012 19:45:26 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 22 Message-ID: References: <1gsagb5e23bgw.1v1kss3azi0d7$.dlg@40tude.net> NNTP-Posting-Host: iv0FLp+Uhvv05NzXKWDP0Q.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/2.6.32-5-amd64 (x86_64)) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:19461 Peter J. Holzer wrote: (snip) > However, the inventors in C did spend some time contemplating typical > uses before deciding on the precedence of the operators, and they > expected that nesting ?: like this: > cond1 ? value1 : > cond2 ? value2 : > cond3 ? value3 : > value4 > would be a typical use and chose the precedence and associativity to > allow this without extra parentheses. I suppose, but some of the C precedence rules are the result of the late addition of the logical operators && and ||. Previously, the & and | operators were used, and they kept their precedence even after && and || were added. -- glen