What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » IF/OR statements

IF/OR statements
Author: Message:
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
38 / Male / Flag
Joined: Mar 2007
O.P. IF/OR statements
Hey Folks

Sorry to ask about such a simple thing, but I can't seem to find it anywhere.  I have need of an OR statement, but I can't seem to find how to do it.

Basically I need to make an IF where Term A is met, and either Term B or Term C & D is/are also met.

can anyone tell me how to do this without using nested IFs, because I'ts to perform a lot of code, and I don't want to have it appearing twice.  I've tried using "OR" but that didn't work.  Is there a term I'm missing, or is it completely impossible?

Cheers all
Leroux
[Image: adsig.jpg]
02-23-2008 07:27 PM
Profile E-Mail PM Web Find Quote Report
vikke
Senior Member
****

Avatar

Posts: 900
Reputation: 28
31 / Male / Flag
Joined: May 2006
RE: IF/OR statements
http://www.w3schools.com/js/js_comparisons.asp
Search for the OR-operator.

This post was edited on 02-23-2008 at 07:28 PM by vikke.
4 8 15 16 23 42
02-23-2008 07:28 PM
Profile E-Mail PM Find Quote Report
Voldemort
Veteran Member
*****

Avatar

Posts: 3504
Reputation: 49
– / – / Flag
Joined: Jul 2005
Status: Away
RE: IF/OR statements
||  <-or
&& <- and

|
V yes, and what dead say

This post was edited on 02-23-2008 at 07:59 PM by Voldemort.
*All posts are a purely speculative hypothesis based on abstract reasoning.
Not my daughter, you bitch!
[Image: ico-mollytrix16.gif]
02-23-2008 07:57 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: IF/OR statements
code:
if(Term A && (Term B || (Term C && Term D))) {
That if statement will execute if Term A is true, and either Term B is true or Term C and D are both true.
02-23-2008 07:58 PM
Profile PM Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
38 / Male / Flag
Joined: Mar 2007
O.P. RE: IF/OR statements
Thank you very much guys.  Vikke: Link saved, cheers.  Voldemort and Dead, cheers v much. :D
[Image: adsig.jpg]
02-23-2008 09:08 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On