Hi,

> I get a parse error with [% series.year - 1 %]. According to the thread
> at
> http://www.mail-archive.com/[email protected]/msg05821.html
> , it is because it is being interpreted as a negative 1 instead of an
> operator.
>
>
>
> What's the workaround? I've tried:
>
>
>
> [% series.year - (1) %]
>
> [% series.year + -1 %]
>
> [% one = 1; series.year - one %]
>
>
>
> all to no avail.

This does not work for me:
[% SET x=1 %]
[% SET y=x-1 %]
[% GET y %]

But this works:
[% SET x=1 %]
[% SET y=x+-1 %]
[% y %]

This is also good:
[% SET x=1 %]
[% SET y=-1+x %]
[% y %]

- Fagzal
--
http://csongor.fagyal.com


_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to