Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: 'eq' and extra spaces after 'and' in comparisons: Edit Log

Here is the list of edits for this post
'eq' and extra spaces after 'and' in comparisons
Hi,


after a few hours of finding what is wrong with my if, else stuff in templates I have noticed that if extra spaces (more than one) is present in code after 'and' if statement will be false...


Example:

Code:

<%set foo = '1'%>
<%set bar = '1'%>



<%if foo eq '1' and bar eq '1'%>
foo bar, eq, NO extra spaces after and
<%endif%>
foo bar, eq, NO extra spaces after and


<%if foo eq '1' and bar eq '1'%>
foo bar, eq, extra spaces after and
<%endif%>
- NOTHING


<%if foo == '1' and == eq '1'%>
foo bar, ==, NO extra spaces after and
<%endif%>
foo bar, ==, NO extra spaces after and


<%if foo == '1' and == eq '1'%>
foo bar, ==, extra spaces after and
<%endif%>
foo bar, ==, extra spaces after and


It is working fine with '==' but not 'eq'


So, I pasted this example on my other site and it is WORKING FINE Crazy

Both sites runs GLinks 3.3.0 with all updates.
Can somebody confirm this?

Thanks!

Last edited by:

Payooo: Sep 12, 2010, 3:46 AM

Edit Log: