首页 > 文档 > ++ (increment)
2017
07-21

++ (increment)

名称:++ (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)

 



最后编辑:
作者:Hewes
这个作者貌似有点懒,什么都没有留下。

++ (increment)》有 1 条评论

  1. Pingback 引用通告: + (addition) 加法 | Processing编程艺术

留下一个回复

你的email不会被公开。