Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: `foo=foo; (( foo ))' => infinite recursion
- X-seq: zsh-workers 10138
 
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
 
- To: zsh-workers@xxxxxxxxxxxxxx
 
- Subject: Re: PATCH: Re: `foo=foo; (( foo ))' => infinite recursion
 
- Date: Tue, 14 Mar 2000 17:26:28 +0000
 
- In-reply-to: <200003140805.JAA00704@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
 
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
 
- References: <200003140805.JAA00704@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
 
On Mar 14,  9:05am, Sven Wischnowsky wrote:
} Subject: PATCH: Re: `foo=foo; (( foo ))' => infinite recursion
}
} 
} Bart Schaefer wrote:
} 
} > On Mar 13, 10:34am, Sven Wischnowsky wrote:
} > } Subject: Re: `foo=foo; (( foo ))' => infinite recursion
} > }
} > } What really irritated me was that getnumvalue() called matheval().
} > 
} > Maybe just a recursion counter with a reasonably large limit?
} 
} Ok.
Something is still too aggressive:
zagzig% foo='x > 0 ? (--x, y += foo) : 1'
zagzig% x=3
zagzig% echo $[foo]
zsh: math recursion limit exceeded
`foo' should have been evaluated at most three times, no?
Maybe there's no real reason to fix this ...
-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author