
-----------------------------------
pcmang
Sat Jan 17, 2009 1:30 pm

How to make and if statement where 2 choices apply. if ontarioName = &quot;ontario&quot; or &quot;Ontario&quot;.
-----------------------------------
when i type  if ontarioName = "ontario" or "Ontario" then...
i get an error.

-----------------------------------
DanielG
Sat Jan 17, 2009 1:32 pm

RE:How to make and if statement where 2 choices apply. if ontarioName = &quot;ontario&quot; or &quot;Ontario&quot;.
-----------------------------------
well, if you only want it to work regardless of lower or uppercase then you can convert it to lower or upper case in the if statement (I believe turing has a built in function for that). However, if you want it to work just for these 2 cases then you need


if ontarioName = "ontario" or ontarioName = "Ontario then


-----------------------------------
pcmang
Sat Jan 17, 2009 2:07 pm

Re: How to make and if statement where 2 choices apply. if ontarioName = &quot;ontario&quot; or &quot;Ontario&quot;.
-----------------------------------
Thanks. That helped.

-----------------------------------
[Gandalf]
Sun Jan 18, 2009 6:54 am

RE:How to make and if statement where 2 choices apply. if ontarioName = &quot;ontario&quot; or &quot;Ontario&quot;.
-----------------------------------
Alternatively, you could condense your if statement into:
if Str.Lower(ontarioName) = "ontario" then
