Operator | Name | Effect | Example | Result (x = 7) |
---|---|---|---|---|
+ | Addition operator | Add two value | x+3 | 10 |
- | Subtraction operator | Subtraction two values | x-3 | 4 |
- | Negation operator | Used with a single operand, it reverses the sign of the variable | -x | -7 |
* | Multiplication operator | Multiplies two values | x*3 | 21 |
/ | Division operator | Divides two values | x/3 | 2.3333333 |
= | Assignment operato | assigns a value to a variable | x=3 | Assign the value 3 to the variable x |
^ | power operator | raise the variable to the specified power x | x^2 | 49 |
Mod | modulo operator | Returns the remainder of division of the left operand to the right of x | x Mod 2 | 1 |
Operator | Name | Effect | Example | Result |
---|---|---|---|---|
= | equality operator | Compares two values ??and check their equality | x=3 | Returns true if X is equal to 3 or false in the other case. |
< | Relational operator (is smaller than) | Checks if a variable is less than a value | x<3 | Returns true if X is less to 3 or false in the other case. |
<= | Relational operator (is smaller than or equal) | Checks if a variable is less than or equal to a value | x<=3 | Returns true if X is less or equal to 3 or false in the other case. |
> | Relational operator (is greater than) | Checks if a variable is greater than a value | x>3 | Returns true if X is greater to 3 or false in the other case. |
>= | Relational operator (is greater than or equal) | Checks if a variable is greater than or equal to a value | x>=3 | Returns true if X is greater or equal to 3 or false in the other case. |
<> | Relational operator (is not) | Checks if variable is different from a value | x<>3 | Returns true if X is different from 3. |
Is | Comparaison operator | Compares two expressions | expression1 Is expression2 | Returns true if the result of the left operand is the same as the one to the right |
Opérateur | Dénomination | Effet | Syntaxe |
---|---|---|---|
Or | Or | Check whether one of the conditions is achieved | ((condition1)Or(condition2)) |
And | AND | Verifies that all conditions are met | ((condition1)And(condition2)) |
Xor | Inverse or | Make the inverse of the OR | ((condition1)Xor(condition2)) |
Eqv | Equivalence | Performs an equivalence between two conditions | ((condition1)Eqv(condition2)) |
Imp | Implication | Checks a logical implication between two conditions | ((condition1)Imp(condition2))
|
Operator | Name | Effect | Syntax | Result |
---|---|---|---|---|
& | Concatenate | Concatenate two strings | "Hello"&"World" | "HelloWorld" |
Like | Compararaison | Compares two strings | "hello" like "goodbye" | False |
DON'T MISS