Zum Hauptinhalt springen
CloudStudio

Arithmetische Operatoren

Arithmetische Operatoren

Arithmetische Operatoren werden in mathematischen Operationen angewendet, und das Ergebnis ihrer Anwendung ist immer eine Zahl.

OperatorExplanationUnary / 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
MODTakes 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
NOTTakes the number given as a parameter, considered as a 32-bit integer, and inverts all bits. Commonly known as "bitwise NOT".Unary
ANDTakes 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
ORTakes 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
XORTakes 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

Zuletzt aktualisiert am

Auf dieser Seite