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

Re: PATCH: 3.1.5 - sample associative array implementation



On Nov 12,  3:22am, Timothy Writer wrote:
} Subject: Re: PATCH: 3.1.5 - sample associative array implementation
}
} > On Nov 11,  3:00pm, Timothy Writer wrote:
} > } The following special notation is used to get all keys:
} > } 
} > }     "${!arrayname[@]}"
} 
} As far as I can tell, only "!" and (of course) "#" are "special" in that
} position.  However, "${!variable}" is also special syntax for name reference
} variables [...]
} 
} 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.)

} "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx> writes:
} > How can you (or can you not) assign to multiple elements simultaneously?
} 
} I don't know, I don't think you can.
[...]
} I don't think there's a way to get both keys and values in a single
} expression.

Thanks for the info.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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