From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/21885 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: Data into arrays in Metapost Date: Fri, 12 Aug 2005 10:23:46 +0200 Message-ID: <42FC5C92.9080407@elvenkind.com> References: <26EDBA58-0ABF-11DA-B14E-001124338712@northcoast.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1123835147 30626 80.91.229.2 (12 Aug 2005 08:25:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Aug 2005 08:25:47 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 12 10:25:46 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1E3Upa-0005Sn-Ls for gctc-ntg-context-518@m.gmane.org; Fri, 12 Aug 2005 10:23:58 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E3A331279D; Fri, 12 Aug 2005 10:23:56 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15610-08; Fri, 12 Aug 2005 10:23:52 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 10BFF1278E; Fri, 12 Aug 2005 10:23:52 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B587D1278A for ; Fri, 12 Aug 2005 10:23:49 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 15827-03 for ; Fri, 12 Aug 2005 10:23:48 +0200 (CEST) Original-Received: from glenfiddich.elvenkind.com (elvenknd.xs4all.nl [213.84.171.68]) by ronja.ntg.nl (Postfix) with ESMTP id 9E3031278E for ; Fri, 12 Aug 2005 10:23:48 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id 22C151828C for ; Fri, 12 Aug 2005 10:23:48 +0200 (CEST) Original-Received: from glenfiddich.elvenkind.com ([127.0.0.1]) by localhost (glenfiddich.elvenkind.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17031-05 for ; Fri, 12 Aug 2005 10:23:47 +0200 (CEST) Original-Received: from [10.10.0.6] (unknown [10.10.0.6]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id 4F23D15BBF for ; Fri, 12 Aug 2005 10:23:47 +0200 (CEST) User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <26EDBA58-0ABF-11DA-B14E-001124338712@northcoast.com> X-Virus-Scanned: by amavisd-new at elvenkind.net X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:21885 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:21885 David Arnold wrote: > Hi, > > Is there a way to read an entire data set into an array in Metpost, > something like: > > numeric coeffs[]; > coeffs:=[1,2,3,4,5]; Not like this. You need to write a loop. Metaposts variables are not really arrays, merely objects with composite names of which the sub-parts are allowed to be numeric expressions. Taco