[Templates] - operator
Rafiq Ismail (ADMIN)
rafiq@joshua.dreamthought.com
Thu, 5 Sep 2002 13:41:20 +0000 (GMT)
Hi.
We've just run into an odd situation where the '-' operator seems to
behave in a manner different to the '+' operator.
We are running tt2 v2.07.
What we have found is something like:
[% isone = 1 %]
.
.
.
[% iszero = isone-1 %]
Doesn't appear to work, whereas :
[% istwo = (isone)+1 %]
Does work.
The subraction was accomplished through:
[% iszero = isone - 1 %]
I'm assuming, without looking at the code, that this has something to do
with looking at -1 as a signed integer and overloading the subraction
operator. The other disturbing things we discovered was that (array.1)-1
did not seem to work, thus defeating the whole point of using brackets.
Is this a feature or a bug? If it is a bug, is there a patch?
Cheers,
Rafiq