Re: [SMARTY-DEV] : Re: [SMARTY-DEV] simple math

From: Date: Fri, 02 May 2003 22:02:34 +0000
Subject: Re: [SMARTY-DEV] : Re: [SMARTY-DEV] simple math
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1327@lists.php.net to get a copy of this message
I just wanted to say that {$foo++} syntax should be taken out again If I want to change the variable, I do {assign var="foo" value=$foo+1} {$foo++} changes foo, {$foo+1} doesn't, and I guess this is not only irritating, but also doesn't hit the desired effect of this simple math stuff Regards, David ----- Original Message ----- From: "Tom Anderson" <toma@etree.org> To: "'Smarty Dev'" <smarty-dev@lists.php.net> Sent: Friday, May 02, 2003 11:39 PM Subject: RE: [SMARTY-DEV] : Re: [SMARTY-DEV] simple math I'd like to put a vote in for not implemting {$var1+$var2}. I think as long as {$var|add:$var2} is noted along side the {$var++} documentation, it'll be fine. I really like the simple math stuff, Monte, and I expect I'll use that instead {counter} if it stays in. Tom -----Original Message----- From: Monte Ohrt [mailto:monte@ispi.net] Sent: Friday, May 02, 2003 3:32 PM To: boots Cc: Smarty Dev Subject: Re: [SMARTY-DEV] : Re: [SMARTY-DEV] simple math Sounds doable, but that adds yet another syntax to the template. :( Monte On Fri, 2003-05-02 at 15:34, boots wrote: > Monte, this is great. > > Of course, everyone will want $var1+$var2. I thought I might suggest > that to get math functionality without changing the parsing too much, > the math expression must be enclosed in parens. > > ie. $var+1 <== no math > ($var+1) <== math allowed > > Might make $var1+$var2 easier to interpret. > > Just an idea. > > __________________________________ > Do you Yahoo!? > The New Yahoo! Search - Faster. Easier. Bingo. > http://search.yahoo.com -- Monte Ohrt <monte@ispi.net> -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.dev (#1327) next »