From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22640 invoked by alias); 7 Nov 2015 18:37:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20927 Received: (qmail 10538 invoked from network); 7 Nov 2015 18:37:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=X+5rdgje c=1 sm=1 tr=0 a=Rb7dudWe+J2gL+/7yVpO1Q==:117 a=Rb7dudWe+J2gL+/7yVpO1Q==:17 a=N659UExz7-8A:10 a=prfidS5qgzzFPBw4GIYA:9 a=pILNOxqGKmIA:10 Message-id: <563E44DE.4030009@eastlink.ca> Date: Sat, 07 Nov 2015 10:37:18 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: two mysteries References: <563A4A75.1020009@eastlink.ca> <151104123546.ZM20556@torch.brasslantern.com> <563AA51B.3040101@eastlink.ca> <151106104455.ZM22748@torch.brasslantern.com> <563D281F.1000304@eastlink.ca> <151107015534.ZM23371@torch.brasslantern.com> <563E1681.4000306@eastlink.ca> <151107091937.ZM24132@torch.brasslantern.com> In-reply-to: <151107091937.ZM24132@torch.brasslantern.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 11/07/2015 09:19 AM, Bart Schaefer wrote: > On Nov 7, 7:19am, Ray Andrews wrote: > } > } I think where I went off the rails is that this was part of my trying > } to pass arrays (as we discussed) rather than flocks of independent > } values [...] > } > } ... and (so far) I don't know how to typeset an element of an array so > > You can't typeset an element of an array. Array elements (including > associative array elements) are presently always scalar. That's my understanding. > There is > some room in the implementation for associative array elements to be > differently-typed, but arrays are stored internally as literal (char**). > > Incidentally "typeset -i -A foo" is not rejected as an error, but the -i > flag always wins and you get an integer rather than an array. Yeah, I tried that and got a rude surprise. Shouldn't it be an error? So it boils down to using $(( )) to make sure things are correct. There were bound to be pitfalls trying to convert the whole data show to arrays, but it was educational and I think probably the right thing for organizational reasons. It didn't hurt speed. zsh with Cish data handling would be an awesome thing. >