Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t6HE7bIu012897 for ; Fri, 17 Jul 2015 16:07:38 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx112) with ESMTPS (Nemesis) id 0Li0IY-1YdFEf28hu-00nDfA for ; Fri, 17 Jul 2015 16:07:31 +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 t6HE65gL009489 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Jul 2015 16:06:05 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t6HCTIGd028762; Fri, 17 Jul 2015 16:06:04 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12372666 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 17 Jul 2015 16:06:04 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t6HE64Po031857 for ; Fri, 17 Jul 2015 16:06:04 +0200 Received: from aso-006-i434.relay.mailchannels.net (aso-006-i434.relay.mailchannels.net [23.91.64.115]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id t6HE5vco009401 for ; Fri, 17 Jul 2015 16:06:00 +0200 X-Sender-Id: netnames|x-authuser|joseph.wright@morningstar2.co.uk Received: from smtp3.easily.co.uk (ip-10-220-9-73.us-west-2.compute.internal [10.220.9.73]) by relay.mailchannels.net (Postfix) with ESMTPA id F2C98A07B6 for ; Fri, 17 Jul 2015 14:05:54 +0000 (UTC) X-Sender-Id: netnames|x-authuser|joseph.wright@morningstar2.co.uk Received: from smtp3.easily.co.uk (smtp3.easily.co.uk [10.21.145.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.5.1); Fri, 17 Jul 2015 14:05:56 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: netnames|x-authuser|joseph.wright@morningstar2.co.uk X-MailChannels-Auth-Id: netnames X-MC-Loop-Signature: 1437141955401:1300164677 X-MC-Ingress-Time: 1437141955400 Received: from [139.222.114.154] (port=61394 helo=[139.222.114.154]) by smtp3.easily.co.uk with esmtpa (Exim 4.43) id 1ZG6Gv-0000ay-0Y for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 17 Jul 2015 15:05:53 +0100 References: <55A8C0C2.3040908@morningstar2.co.uk> <20150717095912.GA6487@hzdr.de> <55A8E267.1030901@morningstar2.co.uk> <20150717140025.GA10619@hzdr.de> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-AuthUser: joseph.wright@morningstar2.co.uk Message-ID: <55A90BC0.6020102@morningstar2.co.uk> Date: Fri, 17 Jul 2015 15:05:52 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: expl3 boolean expressions: lazy evaluation To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <20150717140025.GA10619@hzdr.de> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:LDpBcFRuy3U=:f/FH3PxzYajOwWohW2caM5TQmS uns6UaOcW14z9xnurh0XRxQ4q46WQgs2G2Kbvu9MWmqUExeK+9E/nYrIapb6I+8bakFbCu844 Lp+rCxSjTt3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AiKNubfjv5WxqpfN cf0UbMEi1JnFbl3sUjkDbSjNk/F1mkuCWn0vqSoZnak78uYOuyL/JiuY4bjx8GKINmtVN5rO8 N2gxNmrrEQ/K3Y+5PcP2A1h+I5BLOrENU2srXZ21u7f8mlo75WnmFn8tOpu+zzbSOks6xWiEh 0LSrQqlqmBOQUucjSe3DB5jEMgGPauucNA+wLDgyS6r4p7sXLkNtfQ2udPXdfKD9UXYuN2VbL vviPXnLt47PoK4+B2cHVLckTHe+UepSudIKzgRVrrs5LqcK67d2Eq8VTIBwKMMRHZkrIzjwsG XG8rodH49U+yWWDKv8jkooUQAmC09JLi8TJM0Kxqt/XLa08ROB/xVLOkNj6qULBq0entbadA= = X-UI-Loop:V01:0cpTY8JVaRI=:QWMVT7cglc4HPqG7GbVkjqmvkRjxuCI24YN6+AQAUOw= X-UI-Out-Filterresults: notjunk:1;V01:K0:r77q7pDAGUk=:1Wmcgq/uOFwebMPA9ZgXH4 mVoeIhFedpwfvlGgx45V5SFIV8n2LqXAdbJoCJqXAP1u8ydfQSC7Ldjtw1ATaE5WXQUGqxWFg qQdYggx+K2fWnc/NSr/nGIvjHzMb20ppkUlkiE49nd2Nko+lI2c572tfK3TJzEv5kKrTMTmVq 3h6VAwclmyaU40B7usOWqqquxfgA9ig/N2WkYlgGMcRXfqnuLhhgHkeG5p8S3NZ1iSukltccI mgCh4qIW2+xnUJSAuRmUS1Un6M3piact/ftI5B+k8R9fBY071Rl9YeVL7ZHUApdoxDuJfr/hu bkS95SXtNJ0t+7gbyW7jKtnkj7Tormvdpq5jhpNyeLZQBj+Oub5D4vHIU2LAOiJk01zgDIWIN 6ThP7CawsUkny6+4VWGGnPQpgAcXm9HA1tsNZNGOfI68ZnIGcMaBbs2nwZLCGxODfe/lugHgJ FHS6qwjXA03Vl6fCTjs2kMs4b52jqdfUme1Xc3hWuTOMRZ9fqDPy X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7793 On 17/07/2015 15:00, Alexander Grahn wrote: > Joseph, > > On Fri, Jul 17, 2015 at 12:09:27PM +0100, Joseph Wright wrote: >> by >> >> \bool_if:nTF >> { >> !\cs_if_exist:cTF {#1} > really an `!' in front? > >> by >> >> \bool_if:nT >> { >> ! \cs_if_exist:NTF \fxocg@insert@OC > same here. > >> which could be redone as for the first case in media9. However, >> reviewing the code I realise that as you have \use:c here you'll >> actually get away with it (the second part will evaluate even if the >> csname is undefined). If you do want a 'safe' change then >> >> \bool_if:nTF >> { >> ! \cs_if_exist:cTF { OCGpdfobj#3 } > same here. > > Alexander Indeed :-) I've tried to offer a 'minimal change' version of your code. To do that, I've using the fact that \bool_if:nTF works by expansion. So \bool_if:nTF { !\cs_if_exist:cTF {#1} ... } will find the "!" then expand what follows looking ultimately for \c_true_bool or \c_false_bool. In the usual set up with something like \cs_if_exist_p:c we have a function that will expand to one of these outcomes. With \cs_if_exist:cTF that's not automatically the case but we can put the logical outcomes into the T/F branches (as I did) to force the same result. -- Joseph Wright