Gossamer Forum
Home : Products : Gossamer Links : Discussions :

'eq' and extra spaces after 'and' in comparisons

Quote Reply
'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
Subject Author Views Date
Thread 'eq' and extra spaces after 'and' in comparisons Payooo 5598 Sep 12, 2010, 3:43 AM
Thread Re: [Payooo] 'eq' and extra spaces after 'and' in comparisons
Andy 5453 Sep 12, 2010, 5:06 AM
Thread Re: [Andy] 'eq' and extra spaces after 'and' in comparisons
Payooo 5452 Sep 12, 2010, 5:37 AM
Thread Re: [Payooo] 'eq' and extra spaces after 'and' in comparisons
Payooo 5459 Sep 12, 2010, 5:52 AM
Post Re: [Payooo] 'eq' and extra spaces after 'and' in comparisons
Payooo 5432 Sep 12, 2010, 6:19 AM
Thread Re: [Payooo] 'eq' and extra spaces after 'and' in comparisons
brewt 5413 Sep 12, 2010, 10:05 PM
Post Re: [brewt] 'eq' and extra spaces after 'and' in comparisons
Payooo 5397 Sep 13, 2010, 12:53 AM