From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4516 invoked by alias); 7 Mar 2012 14:27:47 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16865 Received: (qmail 21868 invoked from network); 7 Mar 2012 14:27:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Wed, 7 Mar 2012 14:27:21 +0000 From: Peter Stephenson To: Subject: Re: [[ and [ Message-ID: <20120307142721.652ed815@pwslap01u.europe.root.pri> In-Reply-To: <20120307141121.GA11001@fermat.math.technion.ac.il> References: <4F52D510.6000002@sergio.spb.ru> <120303202448.ZM21278@torch.brasslantern.com> <4F555B0B.1050401@sergio.spb.ru> <120305220555.ZM27709@torch.brasslantern.com> <4F55EF85.3050809@sergio.spb.ru> <20120306113532.789859ca@pwslap01u.europe.root.pri> <20120306114404.359e1c9d@pwslap01u.europe.root.pri> <20120307085236.GC15125@fermat.math.technion.ac.il> <20120307094347.608739c3@pwslap01u.europe.root.pri> <20120307141121.GA11001@fermat.math.technion.ac.il> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.101.10.170] X-Scanned-By: MailControl 7.6.6 (www.mailcontrol.com) on 10.71.0.135 On Wed, 7 Mar 2012 16:11:22 +0200 Nadav Har'El wrote: > Well, I agree that -eq and friends will never be removed - they existed for > at least 33 years now (since 7th edition Unix), so let them stay another 30 > years ;-)). But people who read the manual can be told that there is a > newer alternative, namely ((. That's true. > Anyway, it was you who said these -eq et al. were confusing :-) I like confusing myself, it's one of the ways I know both I and the world still exist. Index: Doc/Zsh/cond.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/cond.yo,v retrieving revision 1.10 diff -p -u -r1.10 cond.yo --- Doc/Zsh/cond.yo 24 Oct 2011 15:35:14 -0000 1.10 +++ Doc/Zsh/cond.yo 7 Mar 2012 14:24:09 -0000 @@ -151,6 +151,11 @@ based on ASCII value of their characters ) item(var(exp1) tt(-eq) var(exp2))( true if var(exp1) is numerically equal to var(exp2). +Note that for purely numeric comparisons use of the +tt(LPAR()LPAR())var(...)tt(RPAR()RPAR()) builtin described in +ifzman(the section `ARITHMETIC EVALUATION')\ +ifnzman(noderef(Arithmetic Evaluation)) is more convenient than +conditional expressions. ) item(var(exp1) tt(-ne) var(exp2))( true if var(exp1) is numerically not equal to var(exp2). -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog