From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47299 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.comp.tex.context Subject: setvalue/setvariable (was: Re: Remove leading spaces) Date: Thu, 5 Feb 2009 21:55:52 +0100 (CET) Message-ID: References: <200902051326.12985.bntgcontext@wiseguysweb.com> <0B4DB4E0-89BE-4EAE-A3E1-2371378C177B@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233868907 23207 80.91.229.12 (5 Feb 2009 21:21:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Feb 2009 21:21:47 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Feb 05 22:23:01 2009 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 lo.gmane.org with esmtp (Exim 4.50) id 1LVBgW-0003kY-1D for gctc-ntg-context-518@m.gmane.org; Thu, 05 Feb 2009 22:22:56 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F33E91FB1F; Thu, 5 Feb 2009 22:21:33 +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 09412-03; Thu, 5 Feb 2009 22:20:49 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EEAFD1FBE8; Thu, 5 Feb 2009 21:56:39 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 369DB1FBDB for ; Thu, 5 Feb 2009 21:56:38 +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 02959-05-2 for ; Thu, 5 Feb 2009 21:55:54 +0100 (CET) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by ronja.ntg.nl (Postfix) with ESMTP id 41D211FB38 for ; Thu, 5 Feb 2009 21:55:54 +0100 (CET) Original-Received: from smtp19.orange.fr (smtp19.orange.fr [80.12.242.18]) by filter4-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n15KtrRf023881 for ; Thu, 5 Feb 2009 21:55:53 +0100 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1918.orange.fr (SMTP Server) with ESMTP id 10F6E1C00097 for ; Thu, 5 Feb 2009 21:55:53 +0100 (CET) Original-Received: from gaston.couberia.bzh (ARennes-358-1-131-117.w92-129.abo.wanadoo.fr [92.129.90.117]) by mwinf1918.orange.fr (SMTP Server) with ESMTP id DEE7E1C00096 for ; Thu, 5 Feb 2009 21:55:52 +0100 (CET) X-ME-UUID: 20090205205552913.DEE7E1C00096@mwinf1918.orange.fr Original-Received: by gaston.couberia.bzh (Postfix, from userid 1000) id 53C2830177; Thu, 5 Feb 2009 21:55:52 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by gaston.couberia.bzh (Postfix) with ESMTP id 3AC62300BF for ; Thu, 5 Feb 2009 21:55:52 +0100 (CET) X-X-Sender: peter@gaston.couberia.bzh In-Reply-To: <0B4DB4E0-89BE-4EAE-A3E1-2371378C177B@gmail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.12.242.18; country=FR; region=A7; city=Moulineaux; latitude=49.3500; longitude=0.9667; http://maps.google.com/maps?q=49.3500,0.9667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 175773170 - dfb24a3aee8f X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.72 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:47299 Archived-At: On Thu, 5 Feb 2009, Wolfgang Schuster wrote: > A faster version of your macro is: > > \def\MyFunction > {\dosingleempty\doMyFunction} > > \def\doMyFunction[#1]% > {\removeunwantedspaces\executeifdefined{myfunction:#1}{\getvalue{myfunction:default}}} > > \setvalue{myfunction:1}{\medspace dog } > \setvalue{myfunction:2}{\medspace cat } > \setvalue{myfunction:default}{\ldots} Hello, I'm working now a lot with \setvariable and \getvariable. What are the advantages/disadvantages of set/get-value over set/get-variable? Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________