User guide
The view model editor
72 Data Integration with Sybase Avaki Studio
Operators
The Operators submenu lists JavaScript operators that you can use to modify your
expression. If you have done any scripting or other programming, you will probably
be familiar with many of these already. The most basic arithmetic operators are not
included in the menu. They are addition (+), subtraction (-), multiplication (*), and
division (/). To enter an operator into your expression, simply choose it from the sub-
menu.
The table below lists the operators in the menu and describes their functionality. Note
that in the descriptions, the terms “LHS” and “RHS” refer to the subexpressions on the
Left Hand Side and Right Hand Side of the operator, respectively.
Menu Item Description
Assign (=) Assigns the RHS value to the LHS variable.
Equal (
==) Evaluates to true if the LHS and RHS are equal.
Not equal (
!=) Evaluates to true if the LHS and RHS are not equal.
Greater than (
>) Evaluates to true if the LHS is greater than the RHS.
Greater than or equal to
(
>=)
Evaluates to true if the
LHS is greater than or equal to the RHS.
Less than (
<) Evaluates to true if the LHS is less than the RHS.
Less than or equal to
(
<=)
Evaluates to true if the
LHS is less than or equal to the RHS.
Logical AND (
&&) Evaluates to true if the LHS and RHS are both true.
Logical OR (
||) Evaluates to true if either the LHS or RHS is true. (Note that if the
LHS is true, the
RHS isn’t even evaluated.)
Logical NOT (
!) Evaluates to true if the RHS is false. Note that there is a unary
operator—there is no
LHS.
Bitwise AND (
&) Produces a new value whose bits are set when the corresponding
bits in the
LHS and RHS are both set. 0xf0a6 & 0xcd0f evalu-
ates to
0xc006, for example.
Bitwise OR (
|) Produces a new value whose bits are set when either of the corre-
sponding bits in the
LHS and RHS is both set.
0xf0a6 | 0xcd0f evaluates to 0xfdaf, for example.