From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19858 invoked from network); 6 Nov 2006 08:20:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO, UPPERCASE_25_50 autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Nov 2006 08:20:10 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 76908 invoked from network); 6 Nov 2006 08:20:03 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Nov 2006 08:20:03 -0000 Received: (qmail 1074 invoked by alias); 6 Nov 2006 08:19:54 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10941 Received: (qmail 1064 invoked from network); 6 Nov 2006 08:19:52 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 6 Nov 2006 08:19:52 -0000 Received: (qmail 75651 invoked from network); 6 Nov 2006 08:19:52 -0000 Received: from flock1.newmail.ru (80.68.241.157) by a.mx.sunsite.dk with SMTP; 6 Nov 2006 08:19:51 -0000 Received: (qmail 23171 invoked from network); 6 Nov 2006 08:19:50 -0000 Received: from unknown (HELO cooker.local) (arvidjaar@newmail.ru@91.76.105.124) by smtpd.newmail.ru with SMTP; 6 Nov 2006 08:19:50 -0000 From: Andrey Borzenkov To: zsh-users@sunsite.dk Subject: Re: is a key of pointed key set ? (where is the + ) Date: Mon, 6 Nov 2006 11:20:09 +0300 User-Agent: KMail/1.9.5 Cc: Marc Chantreux References: <20061106080431.GA17141@ulpmm.u-strasbg.fr> In-Reply-To: <20061106080431.GA17141@ulpmm.u-strasbg.fr> Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611061120.14277.arvidjaar@newmail.ru> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 06 November 2006 11:04, Marc Chantreux wrote: > Hi all, > > See this code: > > pnt=h > typeset -A h > h=( k1 value ) > > so : > > echo ${${(P)pnt}[k1]} > prints value > > but how to know if the key itself is set ? {pts/0}% typeset -A h {pts/0}% h=(k v) {pts/0}% print -- ${(k)h[k]+set} set {pts/0}% print -- ${(k)h[k1]-unset} unset - -andrey -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFFTvA9R6LMutpd94wRAlZNAJwLesklZ5N2tuHvm/tKfvw2wtgqUgCfYBkm Z33cKWv8KRvmBY0ZQ7FBbWE= =5lhJ -----END PGP SIGNATURE-----