[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: array subscripts act differently for integers(ie. let)
From: |
Chet Ramey |
Subject: |
Re: array subscripts act differently for integers(ie. let) |
Date: |
Sat, 21 Feb 2015 12:24:22 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 2/20/15 3:52 PM, Dan Douglas wrote:
> IMO bash is exactly correct. I don't know how this could be "fixed" in
> a way that would satisfy people without changing something very
> fundamental. If you disable the initial expansion to `(())', then
> `(($x))' wouldn't work (because arithmetic evaluation doesn't itself
> evaluate parameter expansions). However if you disabled evaluating
> parameter expansions during variable resolution (for array indexes)
> then you would be stuck with exactly the above ksh problem.
Yeah, exactly. I could potentially avoid the double-expansion issue
by adding flags and other conditional beahvior, but I'm afraid it
would be fragile and inconsistent. The backwards compatibility issue
would come up either way.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Re: array subscripts act differently for integers(ie. let), (continued)
- Re: array subscripts act differently for integers(ie. let), emanuelczirai, 2015/02/18
- Re: array subscripts act differently for integers(ie. let), Eduardo A . Bustamante López, 2015/02/18
- Re: array subscripts act differently for integers(ie. let), Dan Douglas, 2015/02/18
- Re: array subscripts act differently for integers(ie. let), Chet Ramey, 2015/02/19
- Re: array subscripts act differently for integers(ie. let), Chet Ramey, 2015/02/19
- Re: array subscripts act differently for integers(ie. let), Dan Douglas, 2015/02/20
- Re: array subscripts act differently for integers(ie. let),
Chet Ramey <=
Re: array subscripts act differently for integers(ie. let), Eduardo A . Bustamante López, 2015/02/16