Difference between revisions of "Mixly Block Category - Variables"
From Microduino Wiki
(→After Declaring a Variable=) |
|||
Line 1: | Line 1: | ||
+ | A variable is a place to store a piece of data. It has a name, a value, and a type. | ||
+ | *Name - The name or label of that specific variable. Variables are named instances of a Data Type. | ||
+ | *Data Type - There are different data types. Such as integers, floats & doubles (decimals), boolean (true or false), and custom ones. Variables are an instance of a data type. | ||
+ | *Value - Is the stored value of of the Data Type which is referenced under the Variable Name. | ||
+ | |||
+ | In code the format is usually in this format: | ||
+ | |||
+ | '''Data_Type Variable_Name = Value;''' | ||
+ | |||
+ | Example: | ||
+ | |||
+ | |||
+ | Read more here: https://www.arduino.cc/en/Tutorial/Variables | ||
=Declare Variable= | =Declare Variable= | ||
Revision as of 19:13, 27 February 2017
A variable is a place to store a piece of data. It has a name, a value, and a type.
- Name - The name or label of that specific variable. Variables are named instances of a Data Type.
- Data Type - There are different data types. Such as integers, floats & doubles (decimals), boolean (true or false), and custom ones. Variables are an instance of a data type.
- Value - Is the stored value of of the Data Type which is referenced under the Variable Name.
In code the format is usually in this format:
Data_Type Variable_Name = Value;
Example:
Read more here: https://www.arduino.cc/en/Tutorial/Variables