Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Bug with conditional statements

Quote Reply
Bug with conditional statements
I think I found a bug:

<% if page_id ne modify_select or page_id ne payment %>

This does not work as it should.

But this does:

<% if page_id ne modify_select %>

Or am I doing something wrong?

K
Quote Reply
Re: [kajukenbokid] Bug with conditional statements In reply to
In Reply To:
I think I found a bug:

<% if page_id ne modify_select or page_id ne payment %>

This does not work as it should.

But this does:

<% if page_id ne modify_select %>

Or am I doing something wrong?

K

I have no idea what your trying to do but the following works:

<%if pageid eq 'modify_select' or pageid eq 'payment'%>
Quote Reply
Re: [rascal] Bug with conditional statements In reply to
Hi,

I am using the 'ne' operator, not the 'eq':

<% if page_id ne 'modify_select' or page_id ne 'payment'%>
write some HTML
<%endif%>

The above line of code does not work...

I am trying to say is:

If the current page is not 'modify_select' or is not 'payment', then do this ....

Is it that you can't use the ne operator in a conditional this way?

Thanks,

Stefan
Quote Reply
Re: [kajukenbokid] Bug with conditional statements In reply to
Shouldn't that be if the current page is not modify_select and not payment? If you use 'or', then if any one of those expressions is true, then the whole expression will be true (eg. if the page_id is 'payment', then the first expression will be true, and thus the check for payment does not matter).

Adrian

Last edited by:

brewt: Apr 23, 2006, 6:04 PM
Quote Reply
Re: [brewt] Bug with conditional statements In reply to
Yea,

Sorry ... up to late last night.

Blush