Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Crestron SIMPL+
®
Software 
Language Reference Guide - DOC. 5797G
 SIMPL+
®
 
z 13
General Information
Conventions Used
Variable names are placed in <> when discussing syntax. For example, PUSH 
<variable>.
Optional parameters are placed in [ ]. For example, when a list has many parameters, 
it would be described as <var1>[, <var2>...] When discussing array notation, [ ] is 
used for array subscripting and is not used to mark optional code.
Examples are placed in a Computer Style font, i.e., 
MyVariable = ATOI(SomeOtherVariable);
Variable Names
Variable names in SIMPL+ may be up to 30 characters long and may not contain any 
of the operators specified in the “Operators” section. Valid characters in a variable 
name are a-z, A-Z, 0-9, #, _, and $ but may not begin with 0-9.
Variable names may not duplicate existing function or keyword names.
Variable names in SIMPL+ are not case sensitive. For example, declaring a variable 
“joe” can be used as “jOe” or “JOE” or any variation of case. 
Comments
It is beneficial to comment code to make it more readable and for documentation. 
Comments do not exist in any form after code generation and are not required.
SIMPL+ has two styles of comments, single line and block comments. Single line 
comments start with the characters //. The rest of the line (until a carriage return) is 
considered a comment. If they occur within a quoted string, such as in PRINT, they 
are NOT treated as comment characters, but rather as two backslash (Hex 2F) 
characters.
Examples:
PRINT(“Hello, World!\n”);  // This stuff is a comment.
PRINT(“hello, // world!\n”); // This stuff is a comment, 
// but the string actually
NOTE:  Version 3.00.12 users: variable names may be 120 characters for 2-Series 
systems.