Lynn Emery

Lynn Emery

  • NA
  • 4
  • 18.9k

Switch Statements

Jan 29 2014 5:38 PM
Hi I have a program which uses a Switch statement.
Based on the case chosen I want a variable to be set to allow one of two options either "one" or "zero".
I have tired to use an OR statement within the case but it hasn't worked (See below).
Does anyone know a way around this? At the moment it is only allowing one value which is "one" but I want it to allow either "one" or "Zero".
Thanks in advance. 
 
Switch (PLCData)
{
      Case "01"
Message ="one";
AllowedValue ="one" || AllowedValue ="zero";
break;
      Case "02" 
 
 
 

Answers (1)