Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Sun, 26 Apr 2009 08:36:16 +0200 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n3Q6aEZW001925 for ; Sun, 26 Apr 2009 08:36:15 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n3Q6XALB006816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Apr 2009 08:33:10 +0200 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n3PM1N6j004310; Sun, 26 Apr 2009 08:32:58 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 273117 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 26 Apr 2009 08:32:58 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id n3Q6Wvdn024936 for ; Sun, 26 Apr 2009 08:32:57 +0200 Received: from fmmailgate03.web.de (fmmailgate03.web.de [217.72.192.234]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id n3Q6Wh38011316 for ; Sun, 26 Apr 2009 08:32:46 +0200 Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate03.web.de (Postfix) with ESMTP id 9EAB5FB343EA for ; Sun, 26 Apr 2009 08:32:43 +0200 (CEST) Received: from [89.50.25.80] (helo=uwe.lueck) by smtp07.web.de with esmtp (SSLv3:DES-CBC3-SHA:168) (WEB.DE 4.110 #277) id 1Lxxur-0000pu-00; Sun, 26 Apr 2009 08:32:41 +0200 X-Sender: uwe.lueck@pop3.web.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 References: <5.1.0.14.0.20090425151542.032a0ce0@pop3.web.de> <20090424092120.GA7843@irwin.vpn.uni-freiburg.de> <5.1.0.14.0.20090421122917.02f41830@pop3.web.de> <455691F1-21A4-4C65-A025-7855791829F7@gmail.com> <20090424092120.GA7843@irwin.vpn.uni-freiburg.de> <5.1.0.14.0.20090425151542.032a0ce0@pop3.web.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_3829091==_" X-Sender: uwe.lueck@web.de X-Provags-ID: V01U2FsdGVkX19LyI+pJz9Iqgt9dMDa/Znn0L3bd5lCougDfcYz 4Y1RLMNkcRLvffiGCFLV4vfcW09yTiosgMj9cCOXRnqe1Z1EQO WvKjCOg7s= Message-ID: <5.1.0.14.0.20090426075020.02780400@pop3.web.de> Date: Sun, 26 Apr 2009 08:27:38 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Uwe =?iso-8859-1?Q?L=FCck?= Subject: Re: \in@ wrong? To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <20090425183703.GA2822@irwin.vpn.uni-freiburg.de> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -6.599 () BAYES_00,RCVD_IN_DNSWL_MED X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 26 Apr 2009 06:36:16.0746 (UTC) FILETIME=[4D3404A0:01C9C639] Status: R X-Status: X-Keywords: X-UID: 5769 --=====================_3829091==_ Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable At 20:37 25.04.09, Heiko Oberdiek wrote: >On Sat, Apr 25, 2009 at 06:24:08PM +0200, Uwe L=FCck wrote: > > >On 24/04/2009, at 6:51 PM, Heiko Oberdiek wrote: > > >>%%% begin of fixed definition %%% > > >>\def\in@#1#2{% > > >> \def\in@@##1#1##2\in@@{% > > >> \def\in@@{##2}% > > >> \ifx\in@@\@empty > > >> \in@false > > >> \else > > >> \in@true > > >> \fi > > >> }% > > >> \in@@#2\@nil#1\in@@ > > >>} > > >>%%% end of fixed definition %%% > > > > (This uses \@nil.) Putting the second split into a macro to test it=20 > against > > \@empty is safe, but one might dislike it as "slow". > >I prefer "safe". The difference in safety is that other proposals can be fooled by \in@ or=20 \in@@ in \in@ arguments. The "safe" proposal still can be fooled by \@nil=20 or so in \in@ arguments. > > Other proposals need > >I haven't seen any so far. 1. LaTeX-so-far, 2.changing it by just inserting a separator in the last=20 line according to Morten: \def\in@#1#2{% \def\in@@##1#1##2##3\in@@{% \ifx\in@##2\in@false\else\in@true\fi}% \in@@#2\@nil#1\in@\in@@} (where I proposed to use \@in@ in place of \@nil), and 3. mine (expandable= =20 test without \in@). (Attached is a file with testing tools for the four=20 versions.) In favour of Morten's: it is the least change (compatibility). >An expandable test could be used, e.g.: > \ifx\\##2\\% or something else as \\ >instead of > \def\in@@{##2}% > \ifx\in@@\@empty >But the disadvantage is that an unmatched \if..., \else or \fi inside ##2 >breaks the \if constructs of \in@@, thus it isn't safe. And because >exandibility isn't neede here (the first definition destroys this >property anyway), I have used the more safe test for emptiness in >my proposal. Right, on the other hand \in@{a}{a#} and \in@{b}{a#} work with the=20 expandable tests only. Cheers, Uwe. --=====================_3829091==_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: attachment; filename="in.tex" \makeatletter \ProvidesFile{in.tex}[2009/04/25 testing \string\in@\space versions (Uwe Lueck)] \nofiles %% \in@ VERSIONS: % LaTeX so far: \expandafter \let \csname in@LaTeX-so-far\endcsname \in@ % \def\in@#1#2{% % \def\in@@##1#1##2##3\in@@{% % \ifx\in@##2\in@false\else\in@true\fi}% % \in@@#2#1\in@\in@@} % Morton: \def\in@morton#1#2{% \def\in@@##1#1##2##3\in@@{% \ifx\in@##2\in@false\else\in@true\fi}% \in@@#2\@nil#1\in@\in@@} % Heiko: \def\in@heiko#1#2{% \def\in@@##1#1##2\in@@{% \def\in@@{##2}% \ifx\in@@\@empty \in@false \else \in@true \fi} \in@@#2\@nil#1\in@@} % Uwe: \newcommand*{\in@uwe}[2]{% \def\in@@##1#1##2\in@@{% \ifx\in@@##2\in@@\in@false\else\in@true\fi}% \in@@#2\in@#1\in@@} %% MACROS FOR TESTING: \newcommand*{\UseInVersion}[1]{% \expandafter \let \expandafter \in@tested \csname in@#1\endcsname \typeout{Using \string\in@-version `#1'% \space which is:^^J\expandafter \meaning \csname in@#1\endcsname ^^J...:% }} \newcommand*{\InTest}[2]{% \in@tested{#1}{#2}\typeout{`#1' \ifin@\else not \fi in `#2'!}} %% ACTUAL TESTING: \UseInVersion{LaTeX-so-far} % \UseInVersion{morton} % \UseInVersion{heiko} % \UseInVersion{uwe} \InTest{bonbon}{bon} \InTest{bon}{bonbon} \InTest{bona}{bon} \InTest{bon}{bona} \InTest{msam}{msa} \InTest{ionization}{ionizat} \stop --=====================_3829091==_--