From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17782 invoked from network); 19 Jun 2008 09:37:44 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 19 Jun 2008 09:37:44 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 92335 invoked from network); 19 Jun 2008 09:37:36 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Jun 2008 09:37:36 -0000 Received: (qmail 14643 invoked by alias); 19 Jun 2008 09:37:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25212 Received: (qmail 14626 invoked from network); 19 Jun 2008 09:37:31 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 19 Jun 2008 09:37:31 -0000 Received: from rcpt-expgw.biglobe.ne.jp (rcpt-expgw.biglobe.ne.jp [133.205.19.68]) by bifrost.dotsrc.org (Postfix) with ESMTP id A11F88084FA0 for ; Thu, 19 Jun 2008 11:37:23 +0200 (CEST) Received: from smtp-gw.biglobe.ne.jp by rcpt-expgw.biglobe.ne.jp (kbkr/0208160408) with ESMTP id m5J9bKsU022951 for ; Thu, 19 Jun 2008 18:37:20 +0900 X-Biglobe-Sender: Received: from [133.24.86.14] (133.24.86.14 [133.24.86.14]) by smtp-gw.biglobe.ne.jp id SAYRAC15AFD6; Thu, 19 Jun 2008 18:37:20 +0900 (JST) Mime-Version: 1.0 X-Mailer: QUALCOMM MacOS X Eudora Version 6.2J rev3.3 Message-Id: In-Reply-To: <200806171146.m5HBkhfR013230@news01.csr.com> References: <20080612095723.GF5113@sc.homeunix.net> <20080616080726.GP10734@prunille.vinc17.org> <20080616144211.276fb0e3@pws-pc> <2d460de70806170219k12ff4cadn441b52c48bf8076f@mail.gmail.com> <20080617094509.GC5016@sc.homeunix.net> <2d460de70806170324o5a44609x9383cc2445d67dd6@mail.gmail.com> <20080617103829.GD5016@sc.homeunix.net> <20080617114340.398c731f@news01> <20080617112815.GF10734@prunille.vinc17.org> <200806171146.m5HBkhfR013230@news01.csr.com> Date: Thu, 19 Jun 2008 18:37:17 +0900 To: zsh-workers@sunsite.dk From: "Jun T." Subject: Re: arithmetic operator precedence Content-Type: text/plain; charset="us-ascii" X-Virus-Scanned: ClamAV 0.92.1/7505/Thu Jun 19 08:25:19 2008 on bifrost X-Virus-Status: Clean At 0:46 PM +0100 08.6.17, Peter Stephenson wrote: >As it looks like "some sort of" >compatibility might as well be with other shells (so the option could >really be called "SH_PRECEDENCES", although it's perhaps less obvious that >means "something approximating to the precedences you probably expect if >you are a regular programmer") this doesn't give us room for manoeuvre >without yet another option. -3**2 = 9 is quite counter-intuitive and "mathematically wrong", but If the aim of the new option C_PRECECNECES (of SH_PRECEDENCES) is to maximize the compatibility with other shells (not with perl etc.), then I think we are forced to stick to -3**2 = 9. Even if yet another new option is introduced which changes -3**2 to -9, a user whould not notice it unless (s)he reads the long zsh man page carefully. I think it would be sufficient to add to the man page something like "-3**2 gives 9, not -9, in zsh and many other shells. Be sure to use parentheses -(3**2) if you want -9." Of course I have no objection to adding yet another option.