From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17060 invoked by alias); 25 Jun 2015 16:09:05 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35607 Received: (qmail 5519 invoked from network); 25 Jun 2015 16:09:04 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=pBbqLS4FxBIuKb3U5yE/LLx0AliRnjL1MVUEo4VKioo=; b=Qozs/NFZhZ4OfD/Yi6Jor8P40lWXe2TJBWmlDpJ7Kzfae7HCqI/lCQBDqx9KxRIDQ7 zY/MJj0lIHqmRromefQwHsxsxN7u59DWyMJMdwHQHCvmMWetJ7ADvTyLQA1Sp2K338rF Tw+boFjfiZdNmEjBC1bhUa7ry0w3btB8xv/agg3f1xTl/TRg3vxqpCZ3COayiI2gfcB8 /8LqY87Sc5g4DnnCpOEdBrnaaJ0hzCH8p4phqNRqd248uh9nFujsly0o0G6t4BssW5xk 2otDRuErLkG71eul0SD25jv1B6o8eFDNAYnrD7hgICME5igtP5OB8/7HSJbIOejbQcPz LBVQ== X-Gm-Message-State: ALoCoQn6WCiBObh02W4mc0tDS4mHtF2/AUycl2oTapDf/fymGOuxJiMrPiWc/jSwKM5ZCIdMOno/ X-Received: by 10.202.240.215 with SMTP id o206mr37636375oih.94.1435248541378; Thu, 25 Jun 2015 09:09:01 -0700 (PDT) From: Bart Schaefer Message-Id: <150625090858.ZM20203@torch.brasslantern.com> Date: Thu, 25 Jun 2015 09:08:58 -0700 In-Reply-To: <20150625163932.0ca086c8@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: Typeset with array" (Jun 25, 4:39pm) References: <5578996E.3080700@thequod.de> <150610191427.ZM30841@torch.brasslantern.com> <5579C247.1060800@thequod.de> <150611183639.ZM32247@torch.brasslantern.com> <20150612094237.338f79d5@pwslap01u.europe.root.pri> <20150619123930.2688d9e3@pwslap01u.europe.root.pri> <7337.1434735386@thecus.kiddle.eu> <20150625102923.1dc227ff@pwslap01u.europe.root.pri> <150625081653.ZM20153@torch.brasslantern.com> <20150625163932.0ca086c8@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: Typeset with array MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 25, 4:39pm, Peter Stephenson wrote: } Subject: Re: Typeset with array } } > torch% typeset -a array array[2]=two } > typeset: array[2]: inconsistent type for assignment } > torch% typeset -p array } > typeset -a array } > array=() } } That's also correct. typeset -a creates arrays, so "array" is } successfully created; however, array[2] is a scalar with a scalar } assignment, so that's an error with the "-a". No disagreement, but then: torch% typeset var=abcd var[2,3]=23 torch% typeset -p var typeset var=a23d torch% typeset -a array array[2]=(two) typeset: array[2]: array elements must be scalar So slices of scalars work, but not slices of arrays.