名称:++ (increment)
例子:
int a = 1; // Sets ‘a’ to 1
int b = a++; // Sets ‘b’ to 1, then increments ‘a’ to 2
int c = a; // Sets ‘c’ to 2
描述:
Increases the value of an integer variable by 1. Equivalent to the operation i = i + 1. If the value of the variable i is five, then the expression i++ increases the value of i to 6.
将整数变量的值增加1,等效于操作i = i + 1。如果变量i的值为5,则表达式i ++将i的值增加到6。
语法:
value++
参数:
value | int |
---|
相关:
+ (add)
+= (add assign)
— (decrement)
- 本文固定链接: http://iprocessing.cn/2017/07/21/increment/
- 转载请注明: Hewes 于 Processing编程艺术 发表
Pingback 引用通告: + (addition) 加法 | Processing编程艺术