From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: two mysteries
Date: Sat, 07 Nov 2015 10:37:18 -0800 [thread overview]
Message-ID: <563E44DE.4030009@eastlink.ca> (raw)
In-Reply-To: <151107091937.ZM24132@torch.brasslantern.com>
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.
>
prev parent reply other threads:[~2015-11-07 18:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 18:12 Ray Andrews
2015-11-04 20:35 ` Bart Schaefer
2015-11-05 0:38 ` Ray Andrews
2015-11-06 18:44 ` Bart Schaefer
2015-11-06 22:22 ` Ray Andrews
2015-11-07 9:55 ` Bart Schaefer
2015-11-07 15:19 ` Ray Andrews
2015-11-07 17:19 ` Bart Schaefer
2015-11-07 18:37 ` Ray Andrews [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563E44DE.4030009@eastlink.ca \
--to=rayandrews@eastlink.ca \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).