Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Crestron SIMPL+
®
Software 
Language Reference Guide - DOC. 5797G
 SIMPL+
®
 
z 327
      {
      }
      case (2):     // error – 2 has been previously used
      {
      }
      case (5+6):   // error – expressions are not allowed
      {
      }
      case (x):     // error – variables are not allowed
      {
      }
      case (“abc”): // error – strings are not allowed
      {
      }
      case (str):   // error – strings are not allowed
      {
      }
   }
}
Compiler Error 1602
construct  error:  Switch statement contains 'default' without 
'case' labels
The Switch and CSwitch constructs must contain ‘case’ statements if the ‘default’ 
statement is to be used.  The ‘default’ statement is optional.
The following are examples of this error:
FUNCTION MyFunc( INTEGER x )
{
   Switch ( x )
   {
      case (1):  // ok
      {
      }
      default:   // ok
      {
      }
   }
   CSwitch ( x )
   {
      case (1):  // ok
      {
      }
      default:   // ok