Using a OR in a string test

Started by MW4, October 19, 2017, 11:53:31 AM

Previous topic - Next topic

MW4

If I have code below such as this

if strsub(thisline,1,34) == "ABC"

And that works...how can I add a test such as this:

     if strsub(thisline,1,34) == "ABC" or "DEF"

I tried:
     if strsub(thisline,1,34) == "ABC"|"DEF"
and that didn't work


JTaylor

Use   ||

  if strsub(thisline,1,34) == "ABC"  ||   strsub(thisline,1,34) == "DEF"

Jim

MW4