|
The value of the expression that includes the given operation is the value
of the left operand after assignment.
特定の演算を含む式の値は、左の演算対象となる値に代入されます。
Assigning the y value to the x variable y = x;
y の値に変数 x を代入します。
The following operations unite arithmetic or bitwise operations with operation of assignment:
次の演算子は、算術または、ビット演算に代入演算子が結びついたものです。
Adding x to the y variable y += x;
y に x を加算する
Subtracting x from the y variable y -= x;
y から x を減算する
Multiplying the y variable by x y *= x;
y に x を乗算する
Dividing the y variable by x y /= x;
y を x で除算する
Module x value of y y %= x;
y を x で割った剰余
Logical shift of y representation to the right by x bit y >>= x;
y を右に x ビットだけ論理シフトする
Logical shift of y representation to the left by x bit y <<= x;
y を左に x ビットだけ論理シフトする
Bitwise operation AND y &= x;
AND(論理積)ビット演算子
Bitwise operation OR y |= x;
OR(論理和)ビット演算子
Bitwise operation exclusive OR
of x and y binary notations y ^= x;
二進数表記の x と y の XOR(排他的論理和)ビット演算子
There can be only one operation of assignment in an expression. Bitwise
operations are performed with integer numbers only. The logical shift operation
uses values of x less than 5 binary digits. The greater digits are rejected,
so the shift is for the range of 0 to 31 bit. By %= operation (y value
by module of x), the result sign is equal to the sign of divided number.
これらは一つの式に一つの代入演算子しか使用できません。ビット演算子は整数値にしか実行できません。論理シフト演算は5桁の2進数より小さい値しか
x の値を使えません。シフトは 0 〜 31 ビットの範囲ですので、より大きい桁は拒否されます。%= 演算子(y を x で割った剰余)を使用することによって、結果の符合が割った数の符号と等しくなります。
|