Re: [SMARTY-DEV] Simple math request
| From: | messju mohr | Date: | Thu, 15 Apr 2004 10:09:21 +0000 |
| Subject: | Re: [SMARTY-DEV] Simple math request | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2288@lists.php.net to get a copy of this message | ||
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