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

Re: PATCH: 3.1.5 - sample associative array implementation



"Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx> writes:

> On Nov 12,  3:22am, Timothy Writer wrote:
> } Does zsh have namerefs?
> 
> No, zsh does not.  It wouldn't be hard to implement, though.  Can you tell
> what ${!arrayname} would do?  (My recent patch simply ignores the `!' in
> that event.)

Sure

    typeset -A foo
    foo[bar]=baz
    echo ${!foo}

just prints "foo".  Makes sense because foo is not a nameref.

-- 
Tim Writer                                              Tim.Writer@xxxxxxxxxx
FTL Solutions Inc.
Toronto, Ontario, CANADA



Messages sorted by: Reverse Date, Date, Thread, Author