On Monday, February 04, 2013 06:49:36 PM Irek Szczesniak wrote:
> On Mon, Feb 4, 2013 at 5:12 PM, Dan Douglas <[email protected]> wrote:
> > Hi. I noticed quite a while ago that the max arithmetic variable name
> > resolution depth also affects user-defined arithmetic functions. I removed 
> > the
> > check entirely from my ksh without noticing any ill-effects for the last few
> > months (provided you don't screw up with a non-terminating expression).
> >
> > For reference, Bash sets this at 1024 and zsh to 512 (Mksh allows 1
> > dereference per variable). Is ksh93's max of ~8 just an arbitrary number or 
> > is
> > there some negative consequence of going deeper?
> 
> Where you do see the value 8 defined or the check implemented?
> 
> Irek

In sh/streval.c:

#define MAXLEVEL        9

Search for its only usage within the same file:

        if(level++ >=MAXLEVEL)
        {
                arith_error(e_recursive,ep->expr,ep->emode);
                return(0);
        }

-- 
Dan Douglas
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to