Operators are special symbols that performs specific action on one, two or three operands.

## Arithmetic Operators

### Addition (+)

It produces the sum of numeric operands or concatenation in case of string operands.

### Substration (-)

It produces the subtraction of numeric operands.

### Multiplication (*)

It produces the multiplication of numeric operands.

### Division (/)

It produces the quotient of numeric operands where the left operand is dividend and the right one is the divisor.

### Modulus (%)

It produces the remainder of numeric operands where the left operand is dividend and the right one is the divisor.

## Logical Operators

### Logical AND (&& / and)

It performs logical AND between operands.

### Logical OR (|| / or)

It performs logical OR between operands.

### Logical Not (!)

It performs the logical NOT for the operand.

## Bitwise Operators

### Bitwise AND (&)

It performs Bitwise AND between operands. On Binary level, it returns 1 in each bit position for which the corresponding bits of both operands are 1s.

### Bitwise OR (|)

It performs Bitwise OR between operands. On Binary level, it returns 1 in each bit position for which the corresponding bits of either or both operands are 1s.

### Bitwise NOT (~)

It performs Bitwise NOT (or complement) for an operand. On Binary level, it inverts the bits of an operand.

### Bitwise XOR (^)

It performs Bitwise XOR between operands. On Binary level, it returns 1 in each bit position for which the corresponding bits of either but not both operands are 1s.

## Conditional Operators

### Equality (=)

It compares equality between operands.

### Inequality (!=)

It compares inequality between operands.

### Less Than (<)

It returns true if left side operand is less than the right operand, otherwise returns false.

### Less Than or Equal To (<=)

It returns true if left side operand is less than or equal to the right operand, otherwise returns false.

### Greater Than (>)

It returns true if left side operand is greater than the right operand, otherwise returns false.

### Greater Than or Equal To (>=)

It returns true if left side operand is greater than or equal to the right operand, otherwise returns false.

### Ternary(? :)

Ternary operator is short-hand operation of simple if-else statements. If condition can be converted to true, the operator returns the value of exprT, otherwise it returns value of exprF (See below).

**Syntax**: condition ? exprT : exprF

## Recursive Traversal Operators

These are the special operators similar to RegEx **+** and *****, applicable only on Intermediate Steps for IMCExpression.

### Recursive Plus (<intermediate_steps>_)

This is same as **+** operator in RegEx. It gives one or more level of recursive traversal on Intermediate Steps of IMCExpression. It can be used adding underscore (_) at the end of intermediate step. Below example will clear the usage.

### Recursive Star (_<intermediate_step>_)

This is same as ***** operator in RegEx. It gives zero or more level of recursive traversal on Intermediate Steps of IMCExpression. It can be used adding underscore (_) at the start as well as at the end of intermediate step. Below is the self-explanatory example for the same.

## Comments

0 comments

Article is closed for comments.