By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,110 Members | 990 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,110 IT Pros & Developers. It's quick & easy.

Can i say OR in an if/then statement

P: n/a
I am trying to say

if (condition) is true OR (condition) is true THEN

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy
Jul 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a

"crispy" <polaatx@REMOVE THIS PART yahoo.com> wrote in message
news:n8********************************@4ax.com...
I am trying to say

if (condition) is true OR (condition) is true THEN

if (condition) OR (condition) THEN

or

if (condition) = true OR (condition) = true THEN

but remeber that is a boolean value true or false, it is not the same a
string value "true"

in that case

use
if (condition) = 'true' OR (condition) = 'true' THEN

you may even want to use lcase(condition) = 'true'

lcase(value) chanes it to lower case

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy

Jul 19 '05 #2

P: n/a
Tim
I can only guess that you tried

if x=5 or 10 then

which is incorrect and should be

if x=5 or x=10 then
Tim

"crispy" <polaatx@REMOVE THIS PART yahoo.com> wrote in message
news:n8********************************@4ax.com...
I am trying to say

if (condition) is true OR (condition) is true THEN

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy

Jul 19 '05 #3

P: n/a
Tim wrote on 09 jul 2003 in microsoft.public.inetserver.asp.general:
I can only guess that you tried

if x=5 or 10 then

which is incorrect and should be

if x=5 or x=10 then


And:

if x=5 or not x>3 then

is legal.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #4

P: n/a
Crispy,

Here is a good vbscript syntax help page.

http://www.devguru.com/Technologies/...ipt_intro.html

Mike
"crispy" <polaatx@REMOVE THIS PART yahoo.com> wrote in message
news:n8********************************@4ax.com...
I am trying to say

if (condition) is true OR (condition) is true THEN

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy

Jul 19 '05 #5

P: n/a
I strongly recommend you use brackets to keep track of things.

if (x=1) or (x=2) then
'x is either 1 or 2
end if
You'll end up going insane trying to solve order of operation bugs if you
don't.
"crispy" <polaatx@REMOVE THIS PART yahoo.com> wrote in message
news:n8********************************@4ax.com...
I am trying to say

if (condition) is true OR (condition) is true THEN

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy

Jul 19 '05 #6

P: n/a
Thank you all for your help.

crispy

"crispy" <polaatx@REMOVE THIS PART yahoo.com> wrote in message
news:n8********************************@4ax.com...
I am trying to say

if (condition) is true OR (condition) is true THEN

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy

Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.