Skip to content

Operators

Muhammad Hammad edited this page Jul 19, 2017 · 3 revisions

The dvare framework is rich in built-in operators and provides the arithmetic, relational, logical, assignment operations.

Arithmetic Operators

Sr.No Name Syntax Description
1 Add +, add Adds two operands.
2 Subtract -, sub Subtracts the second operand from the first.
3 Multiply *, mul Multiplies both operands.
4 Divide /, div Divides first operand by second.
5 Power ^, pow Repeated multiplication of the first operand by the second time.

Logical Operators

Sr.No Name Syntax Description
1 And &&, and If both the operands are true then condition becomes true.
2 OR ||, or If any one the operands are true then condition becomes true.
3 Not !, not If a condition is true then the operator will make condition false.
4 Implies =>, implies If the first operand is true and the second operand is false condition becomes false.

Relational Operators

Sr.No Name Syntax Description
1 Equals =, eq If two operands are equal condition becomes true.
2 Not Equals !=, ne If two operands are not equal condition becomes true.
3 Less Than <, lt If the first operand is the less than the second operand condition becomes true.
4 Less Equals <=, le If the first operand is less or equal second operand condition becomes true.
5 Greater Than >, gt If the first operand is greater than the second operand condition becomes true.
6 Greater Equals >=, ge If the first operand is greater or equal the second operand condition becomes true.
7 Between between If the first operand is between the range defined in a list inside second operand condition becomes true.
8 In in If the list of values defined inside the second operand contains the first operand condition becomes true.
9 Not In notIn If the list of values defined inside the second operand not contains the first operand condition becomes true.

Clone this wiki locally