bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Logical operators in arithmetic evaluation: documentation vs impleme


From: Linda Walsh
Subject: Re: Logical operators in arithmetic evaluation: documentation vs implementation
Date: Thu, 18 Apr 2013 17:16:46 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666

address@hidden wrote:
> 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 
> "n?n--*f:1")
>>      $ echo "$n"
> 0
---
Hmmm...works here...
> f=n=n?n--*f:1 let n=20 f
echo $n
> 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
reason?

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.
Hmmm....Why not?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]