Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Andy] 'eq' and extra spaces after 'and' in comparisons

Quote Reply
Re: [Andy] 'eq' and extra spaces after 'and' in comparisons In reply to
Hi Andy,

thanks for testing.
Sorry, after so much hours looking for error in my if/else stuf I posted wrong code Angelic
This one should be correct (I hope so).

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 bar == '1'%>
foo bar, ==, NO extra spaces after and
<%endif%>
foo bar, ==, NO extra spaces after and



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



I noticed this error while trying to make my code more human readable, something like:

Code:
<%if
foo eq '1'
and
bar eq '1'
and
lots of other stuf...

%>
Subject Author Views Date
Thread 'eq' and extra spaces after 'and' in comparisons Payooo 5604 Sep 12, 2010, 3:43 AM
Thread Re: [Payooo] 'eq' and extra spaces after 'and' in comparisons
Andy 5460 Sep 12, 2010, 5:06 AM
Thread Re: [Andy] 'eq' and extra spaces after 'and' in comparisons
Payooo 5459 Sep 12, 2010, 5:37 AM
Thread Re: [Payooo] 'eq' and extra spaces after 'and' in comparisons
Payooo 5465 Sep 12, 2010, 5:52 AM
Post Re: [Payooo] 'eq' and extra spaces after 'and' in comparisons
Payooo 5438 Sep 12, 2010, 6:19 AM
Thread Re: [Payooo] 'eq' and extra spaces after 'and' in comparisons
brewt 5419 Sep 12, 2010, 10:05 PM
Post Re: [brewt] 'eq' and extra spaces after 'and' in comparisons
Payooo 5403 Sep 13, 2010, 12:53 AM