Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Bitwise comparison

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
Karel S.
Smarty Rookie


Joined: 03 Aug 2009
Posts: 26
Location: The Netherlands

PostPosted: Wed Aug 12, 2009 2:41 pm    Post subject: Bitwise comparison Reply with quote

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
View user's profile Send private message
Karel S.
Smarty Rookie


Joined: 03 Aug 2009
Posts: 26
Location: The Netherlands

PostPosted: Wed Aug 12, 2009 3:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Aug 12, 2009 5:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Karel S.
Smarty Rookie


Joined: 03 Aug 2009
Posts: 26
Location: The Netherlands

PostPosted: Thu Aug 13, 2009 3:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP