Crestron SIMPL+ Reference Manual page 26

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

Advertisement

Software
Relational Operators
OPERATOR
=
Comparison
=
Assignment
!
Complement
<>
Not Equal To
<
Unsigned Less Than
>
Unsigned Greater
<=
Unsigned Less Than or Equal
>=
Unsigned Greater Than or Equal X >= Y
S<
Signed Less Than
S>
Signed Greater Than
S<=
Signed Less Than or Equal
S>=
Signed Greater Than or Equal
&&
Logical AND
||
Logical OR
®
16
SIMPL+
NAME
EXAMPLE
X = Y
X = Y
! X
X <> Y
X < Y
X > Y
X <= Y
X S< Y
X S> Y
X S<= Y
X S>= Y
X && Y
X || Y
All of the above operators, with the exception of the negation (-), NOT, and
complement (!) operators, are called binary operators. Binary operators take two
values, perform an operation, and return a third value as a result. For example, 5 + 6
would return the value of 11. The arguments for a given operator are called its
operands. In the above example, the + sign is the operator and 5 and 6 are the
operands.
The negation, NOT, and complement operators are called unary operators, which
means it takes a single number and performs an operation. In this case, the negation
operator performs a negate, or 2's complement. A 2's complement takes a 16-bit
number, bitwise inverts it, and adds 1. The operand in a negation is the value being
negated. Operands do not have to be simple numbers. They may also be variables or
the results of a function call. For example, in the expression -X, the - sign is the
operator and the variable X is the operand.
Crestron SIMPL+
EXPLANATION
True if X is equal to Y, False otherwise.
Assigns the contents in Y to X. The assignment
operator cannot be used within expressions.
If X = 0, X changes to 1. If X is different from 0,
evaluates to 0.
X is not equal to Y.
X is less than Y (unsigned).
X is greater than Y (unsigned).
X is less or equal to Y (unsigned).
X is greater or equal to Y (unsigned).
X is less than Y (signed).
X is greater than Y (signed).
X is less or equal to Y (signed).
X is greater or equal to Y (signed).
True if X and Y are both non-zero. False
otherwise.
True if either X or Y is non-zero. False otherwise.
Language Reference Guide - DOC. 5797G
®

Advertisement

Table of Contents
loading

Table of Contents