Arithmetische Operatoren
Arithmetische Operatoren
Arithmetische Operatoren werden in mathematischen Operationen angewendet, und das Ergebnis ihrer Anwendung ist immer eine Zahl.
| Operator | Explanation | Unary / Binary |
|---|---|---|
| + | Adds the two numbers on each side of the operator. | Binary |
| - | Takes the number to the left of the operator and subtracts the number to the right of the operator. | Binary |
| * | Multiplies the two numbers on both sides of the operator. | Binary |
| / | Takes the number to the left of the operator and divides it by the number to the right of the operator. | Binary |
| MOD | Takes the number to the left of the operator, divides it by the number to the right of the operator, and returns the remainder of the division. | Binary |
| - | Sign change. This unary operator changes the sign of the operand to its right. | Unary |
| NOT | Takes the number given as a parameter, considered as a 32-bit integer, and inverts all bits. Commonly known as "bitwise NOT". | Unary |
| AND | Takes the operands on both sides of the operator, considered as 32-bit integers, and performs a logical AND operation for each bit of both operands. Commonly known as "bitwise AND". | Binary |
| OR | Takes the operands on both sides of the operator, considered as 32-bit integers, and performs a logical OR operation for each bit of both operands. Commonly known as "bitwise OR". | Binary |
| XOR | Takes the operands on both sides of the operator, considered as 32-bit integers, and performs a logical XOR operation for each bit of both operands. Commonly known as "bitwise XOR". | Binary |
Operatoren
Operatoren ermöglichen das Erstellen von Ausdrücken durch Modifizieren oder Berechnen von Werten aus anderen, die als "Operanden" bezeichnet werden. Abhängig von der Art der durchzuführenden Operation und/oder dem Datentyp, auf den sie angewendet werden, können Operatoren in verschiedene Kategorien eingeteilt werden.
Logische Operatoren
Logische Operatoren werden in logischen Operationen angewendet, und das Ergebnis ihrer Anwendung ist immer ein boolescher Wert (true / false).