From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29796 invoked from network); 3 Sep 2006 17:28:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,UNPARSEABLE_RELAY autolearn=ham version=3.1.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Sep 2006 17:28:16 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 8849 invoked from network); 3 Sep 2006 17:28:11 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Sep 2006 17:28:11 -0000 Received: (qmail 26173 invoked by alias); 3 Sep 2006 17:28:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22665 Received: (qmail 26164 invoked from network); 3 Sep 2006 17:28:08 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Sep 2006 17:28:08 -0000 Received: (qmail 8539 invoked from network); 3 Sep 2006 17:28:07 -0000 Received: from vms040pub.verizon.net (206.46.252.40) by a.mx.sunsite.dk with SMTP; 3 Sep 2006 17:28:05 -0000 Received: from torch.brasslantern.com ([71.116.118.106]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J5100MJX1UR53U6@vms040.mailsrvcs.net> for zsh-workers@sunsite.dk; Sun, 03 Sep 2006 12:28:04 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k83HS2iS007629 for ; Sun, 03 Sep 2006 10:28:02 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k83HS1al007628 for zsh-workers@sunsite.dk; Sun, 03 Sep 2006 10:28:01 -0700 Date: Sun, 03 Sep 2006 10:28:01 -0700 From: Bart Schaefer Subject: Math assignment to arrays: Is this a bug? To: zsh-workers@sunsite.dk Message-id: <060903102801.ZM7627@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii Try this but be prepared to interrupt it: x=() for (( x=1; x <= 10; x++ )) print $x An infinite stream of "1" is the output. Put "unset x" between the two lines of the example and it works fine. Change the example to x=() for (( x=1; x <= 10; x++ )) typeset x and you get an infinite stream of "x=(1)". Why doesn't the assignment of 1 to x in the loop reset it from array to scalar?