From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17845 invoked from network); 17 May 2005 10:40:27 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 May 2005 10:40:27 -0000 Received: (qmail 54383 invoked from network); 17 May 2005 10:40:21 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 May 2005 10:40:21 -0000 Received: (qmail 11432 invoked by alias); 17 May 2005 10:40:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21264 Received: (qmail 11395 invoked from network); 17 May 2005 10:40:17 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 17 May 2005 10:40:17 -0000 Received: (qmail 54071 invoked from network); 17 May 2005 10:40:17 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 17 May 2005 10:40:13 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Tue, 17 May 2005 11:38:25 +0100 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 17 May 2005 11:41:34 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.1/8.12.11) with ESMTP id j4HAeBcC007102 for ; Tue, 17 May 2005 11:40:11 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.1/8.13.1/Submit) with ESMTP id j4HAeBlS007099 for ; Tue, 17 May 2005 11:40:11 +0100 Message-Id: <200505171040.j4HAeBlS007099@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: PATCH: status of let Date: Tue, 17 May 2005 11:40:10 +0100 From: Peter Stephenson X-OriginalArrivalTime: 17 May 2005 10:41:34.0332 (UTC) FILETIME=[FEB96BC0:01C55ACC] X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 The arithmetic documentation isn't explicit about the return status of "let" and (( ... )); it's just hinted at in the example. The description of the "let" builtin is explicit, but you probably wouldn't look there for documentation on (( ... )) having found the description in the Arithmetic Evaluation section (and who uses the "let" builtin anyway?) Index: Doc/Zsh/arith.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/arith.yo,v retrieving revision 1.8 diff -u -r1.8 arith.yo --- Doc/Zsh/arith.yo 24 Jul 2002 17:55:42 -0000 1.8 +++ Doc/Zsh/arith.yo 17 May 2005 10:38:44 -0000 @@ -21,7 +21,10 @@ matching `tt(RPAR()RPAR())' are treated as a quoted expression and arithmetic expansion performed as for an argument of tt(let). More precisely, `tt(LPAR()LPAR())var(...)tt(RPAR()RPAR())' is equivalent to -`tt(let ")var(...)tt(")'. For example, the following statement +`tt(let ")var(...)tt(")'. The return status is 0 if the arithmetic value +of the expression is non-zero, and 1 otherwise. + +For example, the following statement example((( val = 2 + 1 ))) -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************