Re: operator priorities, was Dangling else



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
.



Relevant Pages

  • Re: Dangling else
    ... our moderator wrote: ... Bear in mind, though, that attempts to reduce the number of levels have ... often been found equally unsatisfactory. ...
    (comp.compilers)
  • Re: increasing the RPS of any page
    ... - performance test as you develop, getting ridding of slow or cpu ... - remember that response.write(your html) is probably much more ... also bear in mind the big difference between slow through waiting (low ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Technical issue with this site
    ... you're confused (or ignorant) of what you're posting to in the first ... You have to bear in mind that my first exposure to computers ... That hair would, for Tina, be a six-inch steel hawser. ...
    (rec.arts.sf.composition)
  • The Biggest Experiments in Science
    ... The ITER nuclear fusion project ... Laser Interferometer Wave Observatory ... Also bear in mind that I work in TV and too many equations tend to ...
    (sci.physics.research)
  • Re: fireflier firewall userspace program doing userspace packet filtering
    ... And bear in mind any user can set the name (I assume you mean the argv ... I've seen no evidence that any existing firewall software has got this ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)