Re: operator priorities, was Dangling else
- From: torbenm@xxxxxxxxxxxxx (Torben Ægidius Mogensen)
- Date: 14 Mar 2006 00:49:29 -0500
Marco van de Voort <marcov@xxxxxxxx> writes:
On 2006-03-05, Henry Spencer <henry@xxxxxxxxxxxxx> wrote:
Bear in mind, though, that attempts to reduce the number of levels have
often been found equally unsatisfactory. Pascal tried, and the result was
counterintuitive cases where certain parentheses, which everyone agrees
ought to be redundant, are in fact necessary.
Could you give examples here? Are you refering to the experimental
notations for exponentiation 2^(-1) in some dialects ?
I think Henry is referring to AND and OR having the same precedences
as * and +, so "x<y AND y<z" would be parsed as "x<(y AND y)<x", which
would be a parse error as "<" is non-associative.
Torben
.
- References:
- Re: Dangling else
- From: Henry Spencer
- Re: Dangling else
- From: Marco van de Voort
- Re: Dangling else
- Prev by Date: New releases of the Parma Polyhedra Library
- Next by Date: Re: dynamic precedence, was Dangling else
- Previous by thread: Re: Dangling else
- Next by thread: Re: operator precedence, was Dangling else
- Index(es):
Relevant Pages
|
|