[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: V+=1 doesn't work if V is a reference to an integer array element
From: |
Greg Wooledge |
Subject: |
Re: V+=1 doesn't work if V is a reference to an integer array element |
Date: |
Wed, 13 Jan 2021 12:49:04 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Wed, Jan 13, 2021 at 07:00:42PM +0200, Oğuz wrote:
> $ declare -n b=a[0]
I can't see any documentation that supports the idea that this should
be allowed in the first place.
-n Give each name the nameref attribute, making it a name
reference to another variable. That other variable is
defined by the value of name. All references, assign‐
ments, and attribute modifications to name, except those
using or changing the -n attribute itself, are performed
on the variable referenced by name's value.
In at least three places there, it says that that "target" of the
name reference is a variable. a[0] isn't a variable.
- V+=1 doesn't work if V is a reference to an integer array element, Oğuz, 2021/01/13
- Re: V+=1 doesn't work if V is a reference to an integer array element,
Greg Wooledge <=
- Re: V+=1 doesn't work if V is a reference to an integer array element, Léa Gris, 2021/01/13
- Re: V+=1 doesn't work if V is a reference to an integer array element, Chet Ramey, 2021/01/13
- Re: V+=1 doesn't work if V is a reference to an integer array element, Léa Gris, 2021/01/13
- Re: V+=1 doesn't work if V is a reference to an integer array element, Oğuz, 2021/01/14
- Re: V+=1 doesn't work if V is a reference to an integer array element, Chet Ramey, 2021/01/14
- Re: V+=1 doesn't work if V is a reference to an integer array element, Léa Gris, 2021/01/14
- Re: V+=1 doesn't work if V is a reference to an integer array element, Chet Ramey, 2021/01/14
Re: V+=1 doesn't work if V is a reference to an integer array element, Ilkka Virta, 2021/01/13