View Full Version : Building an expression with OR
brianlesker
09-10-2004, 03:21 AM
(%db_versie_oud% <> 4403) OR (%db_versie_oud% <> 4500)
Can someone tell me what is wrong with the above expression?
I want to make a if statement like this:
if ((%db_versie_oud% <> 4403) OR (%db_versie_oud% <> 4500))
messagebox(your db version is not 4403 or 4500)
end if
Thanks in advance for the tips!
Brian
csd214
09-10-2004, 03:28 AM
Tip (?):
Have you tried AND in stead of OR?
brianlesker
09-10-2004, 03:48 AM
Doesn't look logical to me, but works! :)
Fenks!
Corey
09-10-2004, 04:04 AM
Hi. When you use AND it requires both conditional statements to be "true" whereas when you use OR it requires only one (either) of the conditional statements to be true... :)
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
brianlesker
09-10-2004, 04:10 AM
Try it in SF6, when i use OR and one of the conditions is true it will fail.
When i use AND, and one of de conditions is true is will go!
if ((%db_versie_oud% <> "4403") AND (%db_versie_oud% <> "4500"))
ShowmsgBox(one of the db_versie_oud is true)
End if
when is use
if ((%db_versie_oud% <> "4403") OR (%db_versie_oud% <> "4500"))
ShowmsgBox(one of the db_versie_oud is true)
End if
and is set %db_versie_oud% to 4500 or 4403 it will fail.
See attachment (startup actions)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.