Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 87454 invoked from network); 25 Oct 2010 19:09:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Oct 2010 19:09:26 -0000 Received: (qmail 52420 invoked by uid 500); 25 Oct 2010 19:09:25 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 52257 invoked by uid 500); 25 Oct 2010 19:09:24 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 52249 invoked by uid 99); 25 Oct 2010 19:09:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Oct 2010 19:09:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [194.25.41.13] (HELO smtpa2.mediabeam.com) (194.25.41.13) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Oct 2010 19:09:13 +0000 Received: from UMS02-SMTP2 (balancer04.mediabeam.com [10.100.1.40]) by smtpa2.mediabeam.com (8.13.8/8.13.1) with ESMTP id o9PJ8a1h018526 for ; Mon, 25 Oct 2010 21:08:36 +0200 Received: from [192.168.0.2] (77-23-50-233-dynip.superkabel.de [77.23.50.233] (may be forged)) (authenticated bits=0) by smtpa.mediabeam.com (8.13.8/8.13.1) with ESMTP id o9PJ8VK0011141 for ; Mon, 25 Oct 2010 21:08:32 +0200 Message-ID: <4CC5D5BC.8020707@maksimo.de> Date: Mon, 25 Oct 2010 21:08:44 +0200 From: Gilbert Rebhan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.12) Gecko/20100914 SUSE/3.0.8 Thunderbird/3.0.8 MIME-Version: 1.0 To: Ant Users List Subject: Re: Number expression in Ant? References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -------- Original Message -------- Subject: Number expression in Ant? From: hezjing To: ant-users Date: 25.10.2010 04:31 > Hi > > Imagine that I have a property with the value "100", then I want to add 50 > to it and get the result as 150. > > How can I do this in Ant? Not with vanilla ant. But there are ant addons like for example antcontrib (development has fallen asleep since 2006) or more lately ant-flaka. foobar ::= '${foobar}' + 50 $${foobar} => ${foobar} foobaz := '${foobar}' + 50 $${foobaz => ${foobaz} .... [echo] ${foobar} => 100 [echo] ${foobar} + 50 => 150 [echo] ${foobaz => 200 .... For ant-flaka details,download,documentation see = http://code.google.com/p/flaka/ Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org