Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Associative Arrays don't work



    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