Jump to content
Sign in to follow this  

Little question with OR

Recommended Posts

Should be more like

$i = 3

if $i == 1 Or $i == 2 Or $i == 7 Then

Break it down:

if $i == 1 OR $i == 2 OR $i == 7 Then

So $i can be any one of 1 or 2 or 7 to fire the "Yhe!" MsgBox

If the statement was made with AND then the condition could never be met.

Due to $i can not be a 1 and 2 and 7 all at the same time.

So the ,"Yhe!" msgbox could never be reached

And would mean all conditions must be met

Or would mean any one of the conditions can be met.

I don't think I explained it very well , but I had a go at it..lol


Edit: damn I'm slow .. there was no posts when I started responding .

Edited by smashly

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...