From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/65440 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: metafun- how to pass array as an argument Date: Mon, 24 Jan 2011 14:26:17 +0100 Message-ID: <4D3D7DF9.209@gmx.net> References: <4D3D757A.8040307@gmx.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040805070204090504020907" X-Trace: dough.gmane.org 1295875587 26265 80.91.229.12 (24 Jan 2011 13:26:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 Jan 2011 13:26:27 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jan 24 14:26:23 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PhMR5-0007pz-0P for gctc-ntg-context-518@m.gmane.org; Mon, 24 Jan 2011 14:26:23 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3F9E5CAA58; Mon, 24 Jan 2011 14:26:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lYSpLexZlxby; Mon, 24 Jan 2011 14:26:19 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A7D77CA967; Mon, 24 Jan 2011 14:26:19 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6D00BCA967 for ; Mon, 24 Jan 2011 14:26:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id m4KpFqVCtGqG for ; Mon, 24 Jan 2011 14:26:16 +0100 (CET) Original-Received: from filter2-nij.mf.surf.net (filter2-nij.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id 276ACCA95C for ; Mon, 24 Jan 2011 14:26:16 +0100 (CET) Original-Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by filter2-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with SMTP id p0OD2trk014612 for ; Mon, 24 Jan 2011 14:02:58 +0100 Original-Received: (qmail invoked by alias); 24 Jan 2011 13:26:13 -0000 Original-Received: from ip-178-200-60-214.unitymediagroup.de (EHLO [192.168.178.3]) [178.200.60.214] by mail.gmx.net (mp012) with SMTP; 24 Jan 2011 14:26:13 +0100 X-Authenticated: #24293357 X-Provags-ID: V01U2FsdGVkX1+fkNsAGCKfbChkiRMj9l/SbRs8khuKydVYyyEg/k K8K7jASRz+PbHf User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Mnenhy/0.8.3 Thunderbird/3.1.7 In-Reply-To: <4D3D757A.8040307@gmx.net> X-Enigmail-Version: 1.1.1 X-Y-GMX-Trusted: 0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.165.64.22; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0aDXp2TJt - b5735c127b63 - 20110124 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:65440 Archived-At: This is a multi-part message in MIME format. --------------040805070204090504020907 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Am 24.01.2011 13:50, schrieb Peter Rolf: > Am 24.01.2011 13:18, schrieb dalyoung: >> \startbuffer[a] >> path p; >> numeric bwidth, u, lastpoint; >> u :=1cm; >> p := fullcircle scaled .3u; >> lastpoint := 0; >> >> def draw_balls = %(expr s) > def draw_balls(text s) = > >> draw (0,0) -- (0, u); >> for i=3,5,0,2,1,7: > for i=s: > >> for j = 1 upto i: >> draw p shifted (lastpoint+.32*j*u,.3u); >> endfor; >> bwidth := .32i*u+.5u; >> draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u); >> lastpoint := lastpoint+bwidth; >> endfor; >> enddef; >> >> draw_balls; >> draw_balls(3,5,0,2,1,7) sorry, i forgot to change this line. example code is attached for testing... >> \stopbuffer >> >> \starttext >> \processMPbuffer[a] >> \stoptext > > works in mkii, but fails in mkiv. i use an outdated version (31.12.2010) > here. > > > ! LuaTeX error
:1: attempt to call field 'feedback' > (a nil value) > stack traceback: >
:1: in main chunk. > ....feedback("\currentMPgraphicname ")} > > \processMPgraphic ...ntMPgraphicformat ", \!!bs #1 > ;\!!es , \!!bs > \currentMPi... > ...feedback("\currentMPgraphicname ")}} > \endMPgraphicgroup > \secondoftwoarguments #1#2->#2 > > l.25 \processMPbuffer[a] > > ? > > > best wishes, Peter > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ > --------------040805070204090504020907 Content-Type: text/plain; name="test.tex" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.tex" XHN0YXJ0YnVmZmVyW2FdDQpwYXRoIHA7DQpudW1lcmljIGJ3aWR0aCwgdSwgbGFzdHBvaW50 OyANCnUgOj0xY207IA0KcCA6PSBmdWxsY2lyY2xlIHNjYWxlZCAuM3U7DQpsYXN0cG9pbnQg Oj0gMDsNCg0KZGVmIGRyYXdfYmFsbHModGV4dCBzKSA9IA0KICBkcmF3ICgwLDApIC0tICgw LCB1KTsNCiAgZm9yIGk9czoNCglmb3IgaiA9IDEgdXB0byBpOg0KCWRyYXcgcCBzaGlmdGVk IChsYXN0cG9pbnQrLjMyKmoqdSwuM3UpOw0KCWVuZGZvcjsNCiAgYndpZHRoIDo9IC4zMmkq dSsuNXU7DQogIGRyYXcgKGxhc3Rwb2ludCwwKSAtLSAobGFzdHBvaW50ICtid2lkdGgsMCkg LS0gKGxhc3Rwb2ludCArYndpZHRoLHUpOw0KICBsYXN0cG9pbnQgOj0gbGFzdHBvaW50K2J3 aWR0aDsNCiAgZW5kZm9yOw0KZW5kZGVmOw0KDQpkcmF3X2JhbGxzKDMsNSwwLDIsMSw3KTsN Cg0KXHN0b3BidWZmZXINCg0KXHN0YXJ0dGV4dA0KXHByb2Nlc3NNUGJ1ZmZlclthXQ0KXHN0 b3B0ZXh0DQo= --------------040805070204090504020907 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --------------040805070204090504020907--