Index
 
  Reference for Wiring 1.0 (ALPHA) 0017+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.
Name  

= (assign)

   
Examples  
int a; 
a = 30;  // Assigns for value 30 to the variable "a" 
a = a + 40;  // Assigns the value 70 to the variable "a" 

Description   Assigns a value to a variable. The "=" sign does not mean "equals", but is used to place data within a variable. The "=" operator is formally called the assignment operator. There are many different types of variables (int, floats, chars, etc.) and the assignment operator can only assign values which are the same type as the variable it is assigning. For example, if the variable is of type int, the value must also be an int.

변수에 값을 지정(저장)합니다. "=" 기호는 등가를 표시하는 기호가 아닙니다. "=" 연산자(operator)는 지정자 입니다. 변수는 여러가지(int, float, char 등등)가 있지만 같은 데이터 유형만 지정 가능합니다. 예를 들어 변수 형이 int 이면 값은 반드시 int 형이어야 합니다.

   
Syntax  
var = value
   
Parameters  
var   any valid variable name

value   any value of the same type as the variable. For example, if the variable is of type "int", the value must also be an int

모든 같은 데이터 형 변수입니다. 예를 들어 변수 형이 int 이면 값은 반드시 int 형이어야 합니다.
   
Usage   Application
   
Related   += (add assign)
-= (subtract assign)