From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15189 invoked from network); 16 Dec 2022 01:31:00 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 16 Dec 2022 01:31:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:Subject:Cc:To:From:Date:References:In-Reply-To:Message-Id: Mime-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=FhbDtYoJzqTQ1eKHFsvv7BUj/tFAPt8QLteuB716JVg=; b=Mpnp9X8ugtZC7aRsLL5Vg/lc1R 7J4joWak0ci8Az47CZbxMUHVhXLNykzAtLkQ1eYDwlJ8D/+KoB7b/hYzZgxd7aXo/9G2pZvA+fhUg j4ejDMDQIQzfVDz8C7f10pEnoHXOCGd6Gfcr5+WlgCNM83ZQzOPtqOA362l6216W9wfAwyAnDr2Qc 5bydwDWtIKjbdy6PR0g6QtrtYVryRUPu/CLa9wCfeoOfqZkh7bGGcu4Cx1/X87W0b7Py4nwpXXKoF 05aARJGsAI5Ndc6OMa5O2vZInxcLWFALSGkpBnFQPUoN8+ib0xm1S944v7j0w8ct2qHlaxK+UKaAm 3mnHG+ow==; Received: by zero.zsh.org with local id 1p5zYx-000LDm-M9; Fri, 16 Dec 2022 01:30:59 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1p5zY2-000KWc-Kj; Fri, 16 Dec 2022 01:30:02 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 07C7B27C0054; Thu, 15 Dec 2022 20:30:01 -0500 (EST) Received: from imap48 ([10.202.2.98]) by compute1.internal (MEProxy); Thu, 15 Dec 2022 20:30:01 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeeigdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpefnrgif rhgvnhgtvgcugggvlhojiihquhgviicuoehlrghrrhihvhesiihshhdrohhrgheqnecugg ftrfgrthhtvghrnhepheegieduieegvddvffdvgeefuddugfetvdettddtfedutdejvefg jefgveethedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheplhgrrhhrhihvodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduudeh udekjeejtdegqdduudelvdejfeekhedqlhgrrhhrhihvpeepiihshhdrohhrghesfhgrsh htmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: iaa214773:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id D9DDA31A0063; Thu, 15 Dec 2022 20:30:00 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-Id: In-Reply-To: <0c2b1f8f-35bb-cd52-3d22-0964a73945b2@eastlink.ca> References: <0c2b1f8f-35bb-cd52-3d22-0964a73945b2@eastlink.ca> Date: Thu, 15 Dec 2022 20:29:03 -0500 From: =?UTF-8?Q?Lawrence_Vel=C3=A1zquez?= To: "Ray Andrews" Cc: zsh-users@zsh.org Subject: Re: uninvited members of associative array Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 28543 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Thu, Dec 15, 2022, at 7:48 PM, Ray Andrews wrote: > On 2022-12-15 16:05, Lawrence Vel=C3=A1zquez wrote: >> How are you creating and populating "main"? Can you provide a test >> case that the rest of us can actually use? > > There's always the chance it doesn't even come to that, some artifact = in=20 > the way the array prints or something. It makes no sense to question the code before verifying that your data isn't garbage. > But if you need to see an=20 > initialization: > > > # nlist(): Initialize 'main' array.=C2=A0 10 elements:=20 > ----------------------------- > main[window]=3D"main" > main[list]=3D'List' > main[lastE]=3D"$#List" > main[hight]=3D$(( mainWH - 2 )) > main[width]=3D$(( mainWW - 2 )) > main[bottomE]=3D"$main[hight]" > main[topE]=3D1 > main[currentE]=3D1 > main[offset]=3D0 > main[active]=3D1 Still a bad test case because it depends on a bunch of other variables that we have to guess about. I don't understand why you can't provide something self-contained. Is that really all that's in "main"? What does "typeset -p main" say? > ... all values assign properly, so where do the uninvited keywords com= e=20 > from? Still not seeing a problem. % cat foo.zsh typeset -A main main[window]=3Dmain main[list]=3DList main[lastE]=3D196 main[height]=3D48 main[width]=3D90 main[bottomE]=3D"$main[height]" main[topE]=3D1 main[currentE]=3D1 main[offset]=3D0 main[active]=3D1 typeset -p main printf '%-20s %s\n' ${(kv)main} % zsh foo.zsh typeset -A main=3D( [active]=3D1 [bottomE]=3D48 [currentE]=3D1 [height]= =3D48 [lastE]=3D196 [list]=3DList [offset]=3D0 [topE]=3D1 [width]=3D90 [= window]=3Dmain ) width 90 window main offset 0 topE 1 height 48 active 1 bottomE 48 lastE 196 list List currentE 1 --=20 vq