Re: [PATCH]: allow recursive variable inderection in arith

Herbert Xu <[email protected]>
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
On Sun, Jan 31, 2021 at 01:29:36PM +0400, Vladimir N. Oleynik wrote:
> 
> My patch for allow recursive variable inderection in arith
> and simplify allow $(( )). Originaly from my arith in busybox
> 
> Before patch:
> $ a=b b=2; echo $((a))
> dash: 1: Illegal number: b
> 
> After patch:
> $ a=b b=2; echo $((a))
> 2
> a=b b="a*2"; echo $((a))
> ./dash: 4: arithmetic expression: expression recursion loop detected: "a"

Again this does not belong in dash because one of the principal
goals is to be minimal.

Thanks,
-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.