Return-Path: X-Original-To: apmail-ant-dev-archive@www.apache.org Delivered-To: apmail-ant-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B2CBF74AF for ; Wed, 20 Jul 2011 10:45:49 +0000 (UTC) Received: (qmail 9674 invoked by uid 500); 20 Jul 2011 10:45:48 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 9575 invoked by uid 500); 20 Jul 2011 10:45:37 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 9153 invoked by uid 99); 20 Jul 2011 10:45:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2011 10:45:34 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jak-ant-dev@m.gmane.org designates 80.91.229.12 as permitted sender) Received: from [80.91.229.12] (HELO lo.gmane.org) (80.91.229.12) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2011 10:45:25 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QjUH0-0006Tq-LA for dev@ant.apache.org; Wed, 20 Jul 2011 12:45:02 +0200 Received: from c-76-23-156-246.hsd1.ma.comcast.net ([76.23.156.246]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Jul 2011 12:45:02 +0200 Received: from jesse.glick by c-76-23-156-246.hsd1.ma.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Jul 2011 12:45:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: dev@ant.apache.org From: Jesse Glick Subject: Re: xor condition Date: Wed, 20 Jul 2011 06:44:47 -0400 Organization: Oracle Corp. / NetBeans Lines: 19 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-76-23-156-246.hsd1.ma.comcast.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11 In-Reply-To: X-Virus-Checked: Checked by ClamAV on apache.org On 07/16/2011 08:59 PM, Matt Benson wrote: > xor(true, false) == true > xor(true, false, true) == false > xor(true, false, true, false) == false > > Is this correct? Follows the usual semantics; cf.: http://en.wikipedia.org/wiki/Exclusive_or#Associativity_and_commutativity > It would seem that semantically an xor over multiple > nested conditions should mean that exactly one value should evaluate > true in order for the xor operation to yield truth. Which is in fact the case in the examples you mentioned, but probably you are thinking of xor(true, true, true) == true which is consistent with the algebraic definition, and the behavior of Java's ^ operator for that matter. If you wanted a condition with the semantics you describe, it should be named something else. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org