Program Structure - Crestron SIMPL+ Reference Manual

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Software

Program Structure

®
276
SIMPL+
When a new SIMPL+ program is created, a template is provided that lists the order
in which constructs and statements should be defined. Sections can be uncommented
and expanded out to implement the desired code.
A SIMPL+ program layout would consist of, in order:
1. Compiler Directives
2. Input/Output definitions From/To a SIMPL Program
3. Global declarations for the module, including STRING, INTEGER,
arrays, structures, etc.
4. FUNCTION declarations
5. PUSH/RELEASE/CHANGE statements
6. FUNCTION MAIN
NOTE: All of these are not mandatory and may be left out as needed.
NOTE: In SIMPL+ Version 3.00, local variables are allowed.
Forward references are not allowed in a SIMPL+ program. This means you cannot
CALL a function before it has been defined. This is the reason FUNCTION
declarations are placed before other code. If function A calls function B, then
function B should be located first in the source file.
FUNCTION MAIN is a special case function. It is not required, but any code present
between the { and } is executed at startup. This is typically used for initialization
purposes.
Example:
FUNCTION MAIN()
{
MyVar=0;
For(I=1 to 10)
B[I] = I;
}
Sometimes function MAIN() contains an endless loop with a DELAY statement that
executes periodically while the program runs.
Crestron SIMPL+
Language Reference Guide - DOC. 5797G
®

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SIMPL+ and is the answer not in the manual?

Table of Contents

Save PDF