Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [[ and [



On Wed, 7 Mar 2012 16:11:22 +0200
Nadav Har'El <nyh@xxxxxxxxxxxxxxxxxxx> 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 <pws@xxxxxxx>            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



Messages sorted by: Reverse Date, Date, Thread, Author