首页 > 文档 > — (decrement)
2017
07-21

— (decrement)

名称:– (decrement)

 

例子:

int a = 5;    // Sets ‘a’ to 5
int b = a–;  // Sets ‘b’ to 5, then decrements ‘a’ to 4
int c = a;    // Sets ‘c’ to 4

 

描述:

Substracts 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– decreases the value of i to 4.

一个整数变量的值减去1,相当于操作i = i – 1。如果变量i的值为5,则表达式i将i的值减为4。

 

语法:

var–

 

参数:

var int

 

相关:

– (minus)
-= (subtract assign)
++ (increment)



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

— (decrement)》有 1 条评论

  1. Pingback 引用通告: – (minus) 减 | Processing编程艺术

留下一个回复

你的email不会被公开。