# TRIK Studio language operators

1. [Binary operators](/en/studio/programming-visual/expression-syntax/operators.md#binary-operators).
2. [Unary operators](/en/studio/programming-visual/expression-syntax/operators.md#unary-operators).
3. [Assignment operator](/en/studio/programming-visual/expression-syntax/operators.md#assignment-operator).
4. [Return operator](/en/studio/programming-visual/expression-syntax/operators.md#return-operator).
5. [Empty operator](/en/studio/programming-visual/expression-syntax/operators.md#empty-operator).

## Binary operators <a href="#binary-operators" id="binary-operators"></a>

| ​Title               | ​Title                       | ​Title                                                                                                         |
| -------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------- |
| +                    | Addition                     | Applicable to real and integer values. The result is an integer if both arguments are integer, otherwise real. |
| -                    | Subtraction                  | Applicable to real and integer values. The result is an integer if both arguments are integer, otherwise real. |
| \*                   | Multiplication               | Applicable to real and integer values. The result is an integer if both arguments are integer, otherwise real. |
| /                    | Division                     | Applicable to real and integer values. The result is real.                                                     |
| //                   | Integer division             | Applicable to integer values. The result is an integer.                                                        |
| ^                    | Power                        | Applicable to real and integer values. The result is real.                                                     |
| %                    | Remainder of the division    | Applicable to integer values. The result is an integer.                                                        |
| &                    | Bitwise "and"                | Applicable to integer values. The result is an integer.                                                        |
| \|                   | Bitwise "or"                 | Applicable to integer values. The result is an integer.                                                        |
| >>, <<               | Bitwise left and right shift | Applicable to integer values. The result is an integer.                                                        |
| ..                   | Concatenation                | Applicable to string values. The result is a string.                                                           |
| >=, >, <, <=         | Comparison operations        | Applicable to integer and real values. The result is boolean.                                                  |
| ==                   | Equality check               | Applicable to any type of value. The result is boolean.                                                        |
| \~=, !=, '\~=', '!=' | Inequality check             | Applicable to any type of value. The result is boolean. All notations are equal.                               |
| and, &&              | Logical "and"                | Applicable to integer, real and boolean types. The result is boolean. All notations are equal.                 |
| or, \|\|             | Logical "or"                 | Applicable to integer, real and boolean types. The result is boolean. All notations are equal.                 |

## Unary operators <a href="#unary-operators" id="unary-operators"></a>

| ​Title | ​Title                 | ​Title                                                                                                                                           |
| ------ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| -      | Arithmetic unary minus | Applicable to integer and real values. The result is an integer or real (depending on the type of argument).                                     |
| \~     | Bitwise "not"          | Applicable to integer values. The result is an integer.                                                                                          |
| not    | Logical "not"          | Applies to boolean, integer, real, and string values, the result is boolean (0 or an empty string is considered false, everything else is true). |
| #      | Length operator        | Applicable to string values. The result is an integer.                                                                                           |

## **Assignment operator**

It has the following form:

`variable1, variable2, …, variableN = expression1, expression2, …, expressionN`

In its simplest form variable `= expression`.

## **Return operator**

It is written as an expression and should be at the end of the statement block.

## **Empty operator**

Written as `;`.

## Example

A statement block with two assignment operators and a return operator:

```
a, b = 1, 2; -- assignment operator and empty operator
c = 3; -- assignment operator and empty operator
a + b + c -- return operator
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.trikset.com/en/studio/programming-visual/expression-syntax/operators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
