Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Crestron SIMPL+
®
Software 
Language Reference Guide - DOC. 5797G
 SIMPL+
®
 
z 333
Compiler Warnings (Compiler Errors 1800 to 1803)
Compiler Warning 1800
compiler warning:  'Return' statement will only terminate 
current Wait statement's function scope 
A ‘Return’ statement within a Wait Statement’s block of code will cause the Wait 
Statement to terminate.  It will NOT terminate the current function that the Wait 
Statement resides within.
Wait Statements are similar to event functions (EVENT, PUSH, CHANGE, 
RELEASE) in that they execute in their own program thread.  The control system can 
have many threads executing at the same time;  each thread runs concurrent with one 
another.
The following are examples of this warning:
FUNCTION MyFunc( INTEGER x )
{
   if ( x == 1 )
   {
      Wait( 500 )
      {
         return;      // warning - this will terminate the
                      //           Wait Statement. It will NOT
                      //           terminate MyFunc()
      }
   }
   else if ( x == 2 )
      return;         // this will terminate MyFunc()
   x = x + 1;
}
Compiler Warning 1801
compiler warning:  'TerminateEvent' statement will only 
terminate current Wait statement's 
function scope
When Wait Statements are embedded within one another, the TerminateEvent, will 
only terminate the corresponding Wait Statement of the same scope.  It will NOT 
terminate any Wait Statements that are of a different scope.
Wait Statements are similar to event functions (EVENT, PUSH, CHANGE, 
RELEASE) in that they execute in their own program thread.  The control system can 
have many threads executing at the same time;  each thread runs concurrent with one 
another.