The increment operator can be placed before (prefix) or after (postfix) a variable.
The increment operator (++) increases the value of a variable by 1. When you use the increment operator in a simple statement, no value is returned.
Firstly there is the unary operator which operates on only one value, for example!(the negation operator) or ++ (the increment operator).
ひとつめは単項演算子で、これはひとつの値に対してのみ作用します。 例えば ! (否定演算子) や ++ (加算子) などです。
A - Postfix decrement operator. ++A Prefix increment operator. - A Prefix decrement operator.
The increment operator increments (adds one to) its operand and returns a value. If it is used postfix, with operator after operand (for example, x++), then it returns the value before incrementing. If it is used prefix with operator before operand (for example, ++x), then it returns the value after incrementing.
増分演算子は、そのオペランドを増分(1を加算)して値を戻します。この演算子をオペランドの後に演算子が付く後置演算子(x++など)にすると、増分前の値が戻されます。また、この演算子をオペランドの前に演算子が付く前置演算子(++xなど)にすると、増分後の値が戻されます。
Andere resultaten
The increment and decrement operators can be applied to integer or pointer variables.
インクリメント演算子とデクリメント演算子は、整数変数またはポインタ変数に適用できます。
These are increment and decrement operators.
The increment and decrement operators are unary operators.
You can use the increment and decrement operators to create new variables without declaring them.
インクリメント演算子とデクリメント演算子を使用すると、変数宣言なしで新しい変数を作成できます。
Use unary operators to increment or decrement variables or object properties and to set integers to positive or negative numbers.
単項演算子は、変数やオブジェクト プロパティをインクリメントまたはデクリメントしたり、整数を正数または負数に設定したりするのに使用します。
When applied to integer variables, the operators increment or decrement the corresponding value by one.
これらの演算子を整数変数に適用した場合、対応する値が 1 増分または 1 減分されます。
When applied to pointer variables, the operators increment or decrement the pointer address by the size of the data type referenced by the pointer.
これらの演算子をポインタ変数に適用した場合、ポインタアドレスが、ポインタが参照しているデータ型のサイズの分だけ増分または減分されます。
The prefix version of the operator increments a variable before its value is used in the statement, as follows
演算子の前置形式では、次のように、変数の値がステートメントで使用される前にインクリメントされます。