From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24901 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: serial definition Date: Tue, 03 Jan 2006 11:51:50 +0100 Message-ID: <43BA5746.3080907@elvenkind.com> References: <43B96ED1.8040409@gmx.net> <43BA530E.2020203@gmx.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1136285525 26062 80.91.229.2 (3 Jan 2006 10:52:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Jan 2006 10:52:05 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 03 11:52:03 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org 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 1Etjll-0006tY-JK for gctc-ntg-context-518@m.gmane.org; Tue, 03 Jan 2006 11:51:57 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B33671285C; Tue, 3 Jan 2006 11:51:56 +0100 (CET) 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 22232-04; Tue, 3 Jan 2006 11:51:53 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C041212845; Tue, 3 Jan 2006 11:51:53 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 06A3E12845 for ; Tue, 3 Jan 2006 11:51:53 +0100 (CET) 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 22308-01 for ; Tue, 3 Jan 2006 11:51:52 +0100 (CET) Original-Received: from glenfiddich.elvenkind.com (elvenknd.xs4all.nl [213.84.171.68]) by ronja.ntg.nl (Postfix) with SMTP id 0ADDF12803 for ; Tue, 3 Jan 2006 11:51:51 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id 7BE29182F0 for ; Tue, 3 Jan 2006 11:51:51 +0100 (CET) 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 28064-07 for ; Tue, 3 Jan 2006 11:51:51 +0100 (CET) Original-Received: from [10.10.0.6] (glenlivet.elvenkind.com [10.10.0.6]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id 347DA17981 for ; Tue, 3 Jan 2006 11:51:51 +0100 (CET) User-Agent: Mozilla Thunderbird 1.0.6-7.1.20060mdk (X11/20050322) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <43BA530E.2020203@gmx.net> 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-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24901 Archived-At: Peter Rolf wrote: >> >>Why do I get K0/V0 for \Get{3}? - it works with \recurselevel! >> You need to expand the \Set commands in that first loop, otherwise you store the literal token \recursevelel inside the definitions of the Key and Val macros (\setvalue{}{} autoexpands its first argument, but not its second argument). When not inside a recursion, \recurselevel expands to the number 0 (zero) in the "manual bit", and you are actually re-evaluating the macro using the then current \recurselevel definition when inside the "looping" bit. So you need: \dostepwiserecurse{1}{9}{1}{ \expanded{\Set{\recurselevel}{K\recurselevel}{V\recurselevel}} } I hope this is clear enough? Cheers, Taco