Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 3.1.5 - sample associative array implementation
- X-seq: zsh-workers 4604
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Timothy Writer <Tim.Writer@xxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: PATCH: 3.1.5 - sample associative array implementation
- Date: Wed, 11 Nov 1998 12:52:36 -0800
- In-reply-to: <m3iugmj8y8.fsf@xxxxxxxxxxxxxxxxx>
- References: <9811111358.AA51361@xxxxxxxxxxxxxxxxx> <vb1znanvcm.fsf@xxxxxxxxxxxxxxx> <m3iugmj8y8.fsf@xxxxxxxxxxxxxxxxx>
On Nov 11, 3:00pm, Timothy Writer wrote:
} Subject: Re: PATCH: 3.1.5 - sample associative array implementation
}
} In ksh93 associative arrays are declared using "typeset -A".
This could easily be mimicked.
} They use the
} same syntax as indexed arrays, e.g. "foo[bar]=baz"; the text within [] is
} subject to variable expansion and whitespace counts.
Hrm. Zsh currently can't handle whitespace inside the [ ]; and I'm not
sure the paramtab implementation I did will work with keys that aren't
parsable as "identifier".
Otherwise this is good.
How can you (or can you not) assign to multiple elements simultaneously?
} The following special notation is used to get all keys:
}
} "${!arrayname[@]}"
Exactly what about that is the special notation? The `!'? Does ksh93
recognize other special characters in that position? Is there any way
to get both the keys and the values in a single expansion?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author