Re: Minor bug declaring arrays of integers: dcl -ai=>broken, dcl -ia=>ok

2013-07-21 Thread Chet Ramey
On 7/14/13 5:03 PM, Linda Walsh wrote: > In order to declare an array of type int (or an integer array) > I first tried: > >> declare -ai -g foo=(1 2 xx 3) >> echo "${foo[@]}" > 1 2 xx 3 <-incorrect > > So then tried: > > >> declare -ia -g foo=(1 2 xx 3) echo "${foo[@]}" >> 1 2 0 3

Re: Minor bug declaring arrays of integers: dcl -ai=>broken, dcl -ia=>ok

2013-07-21 Thread Dan Douglas
On Sunday, July 21, 2013 04:13:31 PM Chet Ramey wrote: > On 7/14/13 5:03 PM, Linda Walsh wrote: > > In order to declare an array of type int (or an integer array) > > I first tried: > > > >> declare -ai -g foo=(1 2 xx 3) > >> echo "${foo[@]}" > > 1 2 xx 3 <-incorrect > > > > So then tri

Re: Minor bug declaring arrays of integers: dcl -ai=>broken, dcl -ia=>ok

2013-07-21 Thread Linda Walsh
Dan Douglas wrote: > On Sunday, July 21, 2013 04:13:31 PM Chet Ramey wrote: >> (For what it's worth, I don't see a difference in the output no matter what >> the option order.) >> Chet > > What's the bug? I can't reproduce this and always get "xx" no mater the > option > order. Ye

Re: Minor bug declaring arrays of integers: dcl -ai=>broken, dcl -ia=>ok

2013-07-21 Thread Dan Douglas
On Sunday, July 21, 2013 08:39:29 PM Linda Walsh wrote: > I don't think so. Not from the above. > > The first sets up an array outside the function composed of integers, > so the 2nd time I execute the same, it gets put through the "integer > strainer". > > The bug is that the "-i" isn't appl