User Guide
Crestron SIMPL+
®
Software
Language Reference Guide - DOC. 5797G SIMPL+
®
z 217
also checks to make sure the format specifier matches the type of the variable being
used (i.e. if %d is used, the variable being used should be INTEGER type).
In the <Static Specification String>, certain values may be printed using “escape
sequences”. Escape sequences start with the \ character and have a variable number
of characters following. The following table specifies the legal escape sequences:
Return Value:
None.
Example:
INTEGER X;
STRING Z[100];
X=10;
Z=”Hello”;
FUNCTION MAIN()
{
// Outputs “This is a string” followed by a CRLF.
PRINT(“This is a string\n”);
// Outputs “The value of X is 10 in decimal, 0A in hex”
// followed by CRLF.
PRINT(“The value of X is %u in decimal, %02X in hex\n”,
X, X);
// Outputs “The String value is Hello”
PRINT(“The String value is %s”, Z);
}
Version:
SIMPL+ Version 1.00
NOTE: If no format specifiers are used, then a simple quoted text string is printed.
ESCAPE MEANING HEX CONSTANT
\n
Carriage Return + Linefeed
\x0D\0A
\t
Tab
\x09
\b
Backspace
\x08
\r
Carriage Return
\x0D
\f
Form Feed
\x0C
\a
Audible Alert (Bell)
\x07
\\
Backslash
\x5C
\'
Single Quote
\x27
\”
Double Quote
\x22
\xZZ
Hex Constant. Z can range from 0-9, a-f or A-F
\xZZ