名称:– (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)
- 本文固定链接: http://iprocessing.cn/2017/07/21/decrement/
- 转载请注明: Hewes 于 Processing编程艺术 发表
Pingback 引用通告: – (minus) 减 | Processing编程艺术