Re: Simple math request

messju mohr <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
On Tue, Apr 06, 2004 at 02:33:16PM +0400, Konstantin A. Pelepelin wrote:
> Hi!
> 
> {$var-5} works, but {5-$var} or {-$var) doesn't.
> {assign var='var2' value=$var-5} works, but value=5-$var or value=-$var 
> doesn't (value=-$var can accidentally work because of string 
> interpretation).
> 
> Is it possible to implement at least in parameters?

that'd be nice. unfortunately _parse_var() is an ugly kludge (IMHO -
at least the simple-math related parts are, if not the whole
thing). It wouldn't be easy to add what you request but it would be a
good addition and raise consistency.

greetings
messju

 
> WBR,
> Konstantin A. Pelepelin

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.