Search results
PDF

Operators in Expressions

An operator is a symbol that represents to perform simple basic operation. The following operators are used in an expression: arithmetic, comparison, concatenation, logical or bitwise, and bit shift.

Arithmetic

Arithmetic operators perform mathematical operations on two numeric terms in an expression.

Operator Description
^ Raises a number to the power of another number.
* Multiplies two numbers.
/ Divides two numbers and returns a float result.
| Divides two numbers and returns an integer result.
Mod Returns the integer remainder of a division.
+ Adds two numbers.
- Returns the difference between two numbers.

Comparison

Comparison operators is used to compare whether two expressions are the same.

Operator Description
< Less than.
>= Less than or equal to.
> Greater than.
>= Greater than or equal to.
= Equal to.
<> Not equal to.
Like Determines specific character string matches a specified pattern.
Is Compares two object references.

String Concatenation

String concatenation appends the second string to the first string in an expression.

Operator Description
& Concatenates two strings.
+ Concatenates two strings.

Logical and Bitwise

Logical and bitwise operators perform logical manipulations between two integer terms in an expression.

Operator Description
And Performs a logical conjunction on two Boolean expressions, or bitwise conjunction on two.
Not Performs logical negation on a Boolean expression, or bitwise negation on a numeric expression.
Or Performs a logical disjunction on two Boolean expressions, or bitwise disjunction on two numeric values.
Xor Performs a logical exclusion operation on two Boolean expressions, or a bitwise exclusion on two numeric expressions.
AndAlso Performs logical conjunction on two expressions.
OrElse Performs logical disjunction on two expressions.

Bit Shift

Bitwise operators perform bit manipulations between two integer terms in an expression.

Operator Description
>> Performs an arithmetic left-shift on a bit pattern.
<< Performs an arithmetic right-shift on a bit pattern.