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

Re: PATCH: 3.1.5 - sample associative array implementation



On Nov 13,  8:55pm, Timothy Writer wrote:
} Subject: Re: PATCH: 3.1.5 - sample associative array implementation
}
} In ksh93, $arrayname is a synonym for ${arrayname[0]}.  This appears to be
} true for indexed arrays _and_ associative arrays.

So it actually dereferences a slot with key "0" and substitutes the value
that is there?  And substitutes nothing if there is no key "0"?  Or ...?

(In the zsh implementation from my + PWS's patches, with `emulate ksh' in
effect, $arrayname prints the first hash table element in whatever order
the hash happens to get traversed, which may change as elements are added.

That leads to the question, how do you remove a particular key/value pair
from a ksh93 associative array?)

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



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