*=
설명
이것은 한 변수와 다른 상수 또는 변수에 곱셈을 하는 편리한 단축이다.
문법
x *= y; // x = x * y; 와 같다.
매개변수
- x: 변수. 허용되는 자료 형: int, float, double, byte, short, long
 - y: 변수 또는 상수. 허용되는 자료 형: int, float, double, byte, short, long
 
예제 코드
void setup() {
  Serial.begin(9600);
  int x = 2;
  x *= 3; // x 는 6
  Serial.print("x = ");
  Serial.println(x);
}
void loop() {
}
시리얼 모니터에 결과:
COM6
x = 6
Autoscroll
Clear output
9600 baud  
Newline  
더보기
- 언어 : += (복합 덧셈)
 - 언어 : &= (복합 비트 AND)
 - 언어 : |= (복합 비트 OR)
 - 언어 : ^= (복합 비트 XOR)
 - 언어 : /= (복합 나눗셈)
 - 언어 : -= (복합 뺄셈)
 - 언어 : -- (감소)
 - 언어 : ++ (증가)
 
※ ARDUINO BUY RECOMMENDATION
| Arduino UNO R3 | |
| Arduino Starter Kit | 
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.
Additionally, some links direct to products from our own brand, DIYables .
Additionally, some links direct to products from our own brand, DIYables .