Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Associative Arrays don't work
- X-seq: zsh-users 10184
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Com MN PG P E B Consultant 3 <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx>
- Subject: Re: Associative Arrays don't work
- Date: Tue, 25 Apr 2006 11:42:50 +0200
- Cc: zsh-users Mailinglist <zsh-users@xxxxxxxxxx>
- In-reply-to: <6F0CB04509C11D46A54232E852E390AC013D97F2@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Com MN PG P E B Consultant 3 <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx>, zsh-users Mailinglist <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <6F0CB04509C11D46A54232E852E390AC013D97F2@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Hi Ronald :)
* Com MN PG P E B Consultant 3 <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx> dixit:
[Contradictory documentation]
> > I can't find where is that said.
>
> Having reread http://zsh.sunsite.dk/Doc/Release/zsh_14.html#SEC72
> again, I now see that we have two contradicting statements about
> this. The first one is exactly like you said:
> >
> > "Associative arrays _must_ be declared before assignment..."
>
> The second information, further down this section, says:
>
> "To create an empty array (including associative arrays), use one of:
> set -A name
> name=()"
>
> When I saw the "use one of", I was happy enough to not read the whole
> section verbatim.
What I would have understood from the above is that name=() will
work for both kind of arrays, you're right... I missed that part
(probably because I already know that the "set -A name" is needed).
The docs may be more clear at that point.
> > Hope this helps ;) (tested under 4.2.6, BTW)
>
> It does, indeed. Thank you very much!
You're very welcome ;)
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to... RAmen!
Messages sorted by:
Reverse Date,
Date,
Thread,
Author