From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81802 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: the difference between \def and \define Date: Tue, 16 Apr 2013 18:03:09 +0200 Message-ID: <516D763D.3040705@wxs.nl> References: <20130415140703.GA5709@homerow> <516C0AC9.6000805@wxs.nl> <516D0EE6.2040004@wxs.nl> <20130416090552.GH5709@homerow> <516D1586.5070705@uni-bonn.de> <20130416101132.GI5709@homerow> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; Format="flowed" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1366128196 26906 80.91.229.3 (16 Apr 2013 16:03:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Apr 2013 16:03:16 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 16 18:03:20 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1US8Ln-0002I7-UD for gctc-ntg-context-518@m.gmane.org; Tue, 16 Apr 2013 18:03:20 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 71E5C10210; Tue, 16 Apr 2013 18:03:19 +0200 (CEST) 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 x7Sqzvorgl+Q; Tue, 16 Apr 2013 18:03:17 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 3A8D2101F8; Tue, 16 Apr 2013 18:03:17 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BCC27101F8 for ; Tue, 16 Apr 2013 18:03:15 +0200 (CEST) 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 lvGsq+7o6vkK for ; Tue, 16 Apr 2013 18:03:14 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 51E5E101E3 for ; Tue, 16 Apr 2013 18:03:14 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r3GG38VW006333 for ; Tue, 16 Apr 2013 18:03:08 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 16450-1713362 for ; Tue, 16 Apr 2013 18:03:07 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: <20130416101132.GI5709@homerow> X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=15; city=Zwolle; latitude=52.5058; longitude=6.0858; http://maps.google.com/maps?q=52.5058,6.0858&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RJoE38Qw - d528ed3edf39 - 20130416 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:81802 Archived-At: On 4/16/2013 12:11 PM, Marco Patzer wrote: > On 2013=9604=9616 Thomas A. Schmitz wrote: > >> I'm not lobbying for define to have something similar, I just want >> to point out that it would be in the spirit of convergence between >> ConTeXt and Lua. It certainly isn't an urgent need, but having >> >> \define[one,two,three] >> >> wouldn't be absurd, now would it? > > Sorry, misunderstanding on my part. That one looks fine. I thought > we're talking about translating the number to words, which wouldn't > make any sense: > > \define[3]\foo{#one, #two, #three} > > I still don't think it's necessary to use named parameters with > \define. For modules most likely \def, \setvalue or texdefinition > are being used and \define for in-document markup, wherefore > numbered parameters are perfectly fine. The only thing that could be > improved is a definition which doesn't interfere with \asciimode, > but that's low priority and can easily be worked around. It's also messy (in parsing): \define[#one,#two]\test{#one#two} there we have to collect and move the test backwards. Also, names = defeats the use of the one number becoming multiple #'s so it then close to \define\test[#one,#two]{#one#two} which is nearly \def\test[#one,#two]{#one#two} apart from the checking, so i decided to provide this: \checked\def \whatevera#alpha#beta{#alpha + #beta} \checked\edef\whatevera#alpha#beta{#beta + #alpha} \unique \def \whateverb#alpha#beta{#alpha + #beta} \unique \edef\whateverb#alpha#beta{#beta + #alpha} \whatevera{1}{2}\par \whateverb{1}{2}\par (can be used with \def \edef \xdef \gdef \udef \uedef \uxdef and \ugdef) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________