From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24573 invoked from network); 13 Mar 2000 16:06:01 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Mar 2000 16:06:01 -0000 Received: (qmail 8915 invoked by alias); 13 Mar 2000 16:05:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10119 Received: (qmail 8890 invoked from network); 13 Mar 2000 16:05:50 -0000 From: "Bart Schaefer" Message-Id: <1000313160538.ZM2376@candle.brasslantern.com> Date: Mon, 13 Mar 2000 16:05:38 +0000 In-Reply-To: <200003130934.KAA16098@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: `foo=foo; (( foo ))' => infinite recursion" (Mar 13, 10:34am) References: <200003130934.KAA16098@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: Sven Wischnowsky , zsh-workers@sunsite.auc.dk Subject: Re: `foo=foo; (( foo ))' => infinite recursion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 13, 10:34am, Sven Wischnowsky wrote: } Subject: Re: `foo=foo; (( foo ))' => infinite recursion } } What really irritated me was that getnumvalue() called matheval(). } That meant that in cases like the one above $foo could contain any } mathematical expression and that would get evaluated. Urgh. This is ugly, but appears to have been done for a long time, so I'm a bit leery of changing it. (( foo == $foo )) is probably meant to be true, which won't be the case any more with your patch. Maybe just a recursion counter with a reasonably large limit? } One question: currently it only skips white space at the beginning of } $foo to find the number (btw, all number-formats zsh knows of should } be understood); should we make it skip all non-numeric characters? No, I don't think so. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com