logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Precisely  
#1 Posted : Monday, January 2, 2012 12:29:04 PM(UTC)
Precisely

Rank: Member

Groups: Registered, Registered Users, Unverified Users
Joined: 6/9/2010(UTC)
Posts: 17

Hi Have some trouble with an exit signal. How do I express for instance (Condition 1) OR (Condition 2 AND Condition 3). I've tried according to this, but doens't work. BR
mstt  
#2 Posted : Monday, January 2, 2012 1:41:33 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi BR

You appear to have it correct with (Condition 1) OR (Condition 2 AND Condition 3).
Either of the following formats should work because these statements are logically identical. The AND operator takes precedence over OR, so "Condition2 AND condition3" functions separately from "Condition1".

Condition1 OR Condition2 AND Condition3;
(Condition1) OR (Condition2 AND Condition3);

If in doubt about AND and OR precedence be sure to enclose each grouping of logical conditions with brackets. Where there are multiple expressions in a "condition" or statement it is very easy to overlook one detail and end up with code that does something quite different from what you intended.. If you can't find the problem then I suggestyou post your code in full - the devil will be in the detail.

Roy

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.