User Guide

Software Crestron SIMPL+
®
92 z SIMPL+
®
Language Reference Guide - DOC. 5797G
Example:
ANALOG_INPUT AIN;
INTEGER X;
SWITCH(AIN)
{
CASE (2):
{
X = 0;
}
CASE (3):
{
X = AIN;
}
CASE (5):
{
X = AIN + 1;
}
DEFAULT:
PRINT(“Unknown command %d!\n”, AIN);
}
In this example, if the value of AIN is 2, X is set equal to 0. If AIN is 3, X is set equal
to AIN. If AIN is 5, X is set equal to AIN+1. If AIN is any other value, an error
message is printed.
Version:
SIMPL+ Version 2.00 - removes CASE restriction
SIMPL+ Version 1.00 with 32 CASE statements maximum