Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `foo=foo; (( foo ))' => infinite recursion
- X-seq: zsh-workers 10119
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: `foo=foo; (( foo ))' => infinite recursion
- Date: Mon, 13 Mar 2000 16:05:38 +0000
- In-reply-to: <200003130934.KAA16098@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200003130934.KAA16098@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author