From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/27179 Path: news.gmane.org!not-for-mail From: =?ISO-8859-15?Q?Peter_M=FCnster?= Newsgroups: gmane.comp.tex.context Subject: Re: \doifdefinedelse and \write Date: Fri, 14 Apr 2006 20:40:35 +0200 (CEST) Message-ID: References: <443FD9B6.5000608@wxs.nl> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1145040273 19304 80.91.229.2 (14 Apr 2006 18:44:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Apr 2006 18:44:33 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Fri Apr 14 20:44:31 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 1FUTH9-0008SI-2L for gctc-ntg-context-518@m.gmane.org; Fri, 14 Apr 2006 20:44:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7CB371279E; Fri, 14 Apr 2006 20:44:10 +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 19056-01-2; Fri, 14 Apr 2006 20:44:06 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 07AFA1278E; Fri, 14 Apr 2006 20:44:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4EF191276C for ; Fri, 14 Apr 2006 20:44:05 +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 18633-05 for ; Fri, 14 Apr 2006 20:44:04 +0200 (CEST) Original-Received: from smtp.cegetel.net (mf01.sitadelle.com [212.94.174.68]) by ronja.ntg.nl (Postfix) with SMTP id 109841278D for ; Fri, 14 Apr 2006 20:40:43 +0200 (CEST) Original-Received: from gaston.pm (unknown [84.7.255.87]) by smtp.cegetel.net (Postfix) with ESMTP id E78DE6A087A for ; Fri, 14 Apr 2006 20:40:42 +0200 (CEST) Original-Received: by gaston.pm (Postfix, from userid 500) id DE47613C113; Fri, 14 Apr 2006 20:40:35 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by gaston.pm (Postfix) with ESMTP id DB069148182 for ; Fri, 14 Apr 2006 20:40:35 +0200 (CEST) X-X-Sender: peter@gaston.pm Original-To: mailing list for ConTeXt users In-Reply-To: <443FD9B6.5000608@wxs.nl> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:27179 Archived-At: On Fri, 14 Apr 2006, Hans Hagen wrote: > > \def\myMacro#1{\doifdefinedelse{myTest#1}{Yes}{No}} > > \def\myTestfile{\jobname-test.tmp} > > \def\myTestbla{just a test} > > \starttext > > \immediate\write18{echo \myMacro{bla} \myMacro{blub} >\myTestfile} > > \typefile{\myTestfile} > > \stoptext > > > \def\myMacro#1{\ifundefined{myTest#1}Yes\else No\fi} > > (see definition of \doifdefinedelse: it does some clever things in order > to handle messy #1's) Great, thanks for your fast help! I tried a lot of things with \expanded{} and \unexpanded but I've never thought of looking for another if-else command... Thanks, Peter -- http://pmrb.free.fr/contact/