Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!rpi!uupsi!camb.com!tinkelman From: tinkelman@camb.com (Bob Tinkelman) Newsgroups: comp.mail.misc Subject: Re: Precedence of ! and % (was: sending from MIT Message-ID: <1991Jan11.233426.39467@camb.com> Date: 12 Jan 91 04:34:26 GMT References: <1990Dec6.214052.25275@athena.mit.edu> <1990Dec18.142213.23820@comm.wang.com> <893@bacchus.esa.oz.au> Organization: Cambridge Computer Associates, Inc. Lines: 25 In article <893@bacchus.esa.oz.au>, david@bacchus.esa.oz.au (David Burren) writes: > To quote from section 5.2.16 of RFC1123: > > It is suggested that "%" have lower precedence than any other > routing operator (e.g., "!") hidden in the local-part; for > example, "a!b%c" would be interpreted as "(a!b)%c". > > To me this seems a contradiction. Surely if "%" has lower precedence > than "!" then "a!b%c" should be interpreted as "a!(b%c)"! ... > Is this a typo in the RFC, or am I totally deranged? It's *not* a typo. (Not to imply the 2nd part of your question!) The author of the RFC was using the term `precendence' in the manner that it is used in mathematics when talking about the order in which binary operators are applied in an expression, lacking explicit directions via parentheses. For example, in normal usage multiplication is said to have higher precendence than addition, so a*b+c = (a*b)+c. It's called `higher precendence' because you do it first. However, it was the analogy with the parentheses that the RFC was driving at, as evidenced by the example: a!b%c means (a!b)%c. -- Bob Tinkelman, Cambridge Computer Associates, Inc., 212-425-5830, bob@camb.com