Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple case if statement
#1
I want to create a process that will run if a string is any of several different values without doing a separate if statement and command?
Code:
Copy      Help
if x=1 do this
if x =5 do the same thing
if x=17 do the same thing

In VB you can do a sort of
Code:
Copy      Help
if x in {1,5,17} do this


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)