Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16231
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: nameref pointing to array element |
| Date | 2020-04-23 17:00 -0400 |
| Organization | ITS, Case Western Reserve University |
| Message-ID | <mailman.1051.1587675659.3066.bug-bash@gnu.org> (permalink) |
| References | <1cedb24c-8f75-3ee2-6d81-26b37ab0c63a@autistici.org> <f5e9cb30-5568-11a8-d23c-2b33396eaf53@case.edu> |
On 4/22/20 6:05 PM, Daniel Molina wrote: > Hello, > > Is the following an intended behavior? Undefined? A bug? > > $ a[1]=2; declare -n ref=a[1]; echo $ref $((ref)) > 2 0 Thanks for the report. It looks like a bug, even though the rules for evaluating strings in the expression evaluator are slightly different from the ones for nameref resolution. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: nameref pointing to array element Chet Ramey <chet.ramey@case.edu> - 2020-04-23 17:00 -0400
csiph-web