[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Logical operators in arithmetic evaluation: documentation vs impleme
Re: Logical operators in arithmetic evaluation: documentation vs implementation
Thu, 18 Apr 2013 17:16:46 -0700
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:18.104.22.168) Gecko/20100228 Lightning/0.9 Thunderbird/22.214.171.124 Mnenhy/0.7.6.666
> On Thu, Apr 18, 2013 at 12:02:55PM -0500, Dan Douglas wrote:
>> 10 factorial (bash/ksh93/zsh):
>> $ f=n=n?n--*f:1 let n=10 f
> bash: let: n=n?n--*f:1: expression recursion level exceeded (error token is
>> $ echo "$n"
> f=n=n?n--*f:1 let n=20 f
> echo 2432902008176640000
> bash --version
GNU bash, version 4.2.45(1)-release (x86_64-suse-linux-gnu)
Maybe the recursion limit on your box is set quite "low" for some
But the above is not a function, so would FUNCNEST even apply? Default
is not to limit though, so unless you set it...??
I see no mention of FUNCNEST being applied as a limit
for expression recursion.
That said, I'm still trying to wrap my head around
how that expands. Looks like setting -x doesn't work.