|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Karel S. Smarty Rookie
Joined: 03 Aug 2009 Posts: 26 Location: The Netherlands
|
Posted: Wed Aug 12, 2009 2:41 pm Post subject: Bitwise comparison |
|
|
Right now I'm porting Smarty 2 templates to Smarty 3.
For some reason I can't do a bitwise comparison (works fine in Smarty 2.6).
Code: |
{if ($level & MASK) > NO_ACCESS}
//
{/if}
|
I get this message:
Unexpected "& ", expected one of: "==" , "!=" , "(>,GT)" , "(<,LT)" , "(>=,GE)" , "(<=,LE)" , "===" , "!=="
Error: Syntax Error in template "/var/.../index.html"
File: /var/.../smarty/sysplugins/internal.templatecompilerbase.php
Line: 264 |
|
Back to top |
|
Karel S. Smarty Rookie
Joined: 03 Aug 2009 Posts: 26 Location: The Netherlands
|
Posted: Wed Aug 12, 2009 3:22 pm Post subject: |
|
|
And got this error:
Code: |
{if $iCountryId == 1 || $iCountryId == 2}
//
{/if}
|
Error: Syntax Error in template "/var/.../index.html" on line 84 "{if $iCountryId == 1 || $iCountryId == 2}" - Unexpected "= ", expected one of: INTEGER , "+" , "-" , "(" , "[" , "$" , "identifier" , """ , "'" , "boolean" , "null" , "#"
File: /var/.../sysplugins/internal.templatecompilerbase.php
Line: 264 |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Aug 12, 2009 5:20 pm Post subject: |
|
|
Bit operations have not been implemented in Smarty 3. This was dropped in some early discusions.
Your second error was introduced by yesterdays update. It is fixed with todays update of the SVN. |
|
Back to top |
|
Karel S. Smarty Rookie
Joined: 03 Aug 2009 Posts: 26 Location: The Netherlands
|
Posted: Thu Aug 13, 2009 3:11 pm Post subject: |
|
|
Quote: | Bit operations have not been implemented in Smarty 3. This was dropped in some early discusions. |
Didn't known that. No problem.
Quote: | Your second error was introduced by yesterdays update. It is fixed with todays update of the SVN. |
Thanks. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|