12-29-2013, 12:07 AM
You can use the "either a or b, or both" function in the if else.
Let's say you have a string variable called abString. And you have a an object that needs to says YES if abString is "ab","aB","AB", or "Ab" and says NO when it is something else.
if true
object say YES...
else
object say NO
Replace 'true' by dragging function "either a or b, or both." Then replace 'a' and 'b' by abString== ab and by abString ==aB.
The above has covered the two possible strings to add the other two you can use two methods:
1 nesting another if else clause
if either abString == ab or abString == aB, or both
object say YES
[B]else[B]
if either abString == AB or abString == Ab, or both
object say YES
[B]else
object say NO
2 extend the logic
if either(either(either abString == ab or abString ==aB, or both) or abString == AB) or both) or abString == Ab, or both
object say YES
else
object say NO
I added the parenthesis for clarity.
I hope I have not complicated it more.
|