This shows you the differences between two versions of the page.
— |
arduino:data_types:long [2024/02/16 01:04] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | !long | ||
+ | |||
+ | ====Description ==== | ||
+ | |||
+ | Long variables are extended size variables for number storage, and store 32 bits (4 bytes), from -2,147,483,648 to 2,147,483,647. | ||
+ | |||
+ | ====Example ==== | ||
+ | |||
+ | |||
+ | <code arduino> long speedOfLight = 186000L; // see Integer Constants for explanation of the 'L' | ||
+ | </code> | ||
+ | |||
+ | ====Syntax ==== | ||
+ | |||
+ | [=long var = val;=] | ||
+ | |||
+ | *var - the long variable name | ||
+ | *val - the value assigned to the variable | ||
+ | |||
+ | |||
+ | ====See Also ==== | ||
+ | |||
+ | * [[arduino:data_types:Byte]] | ||
+ | * [[arduino:data_types:Int]] | ||
+ | * [[arduino:data_types:unsignedint|unsigned int]] | ||
+ | * [[arduino:data_types:unsignedlong|unsignedlong]] | ||
+ | * [[arduino:data_types:IntegerConstants | Integer Constants]] | ||
+ | * [[arduino:variable scope and qualifiers:VariableDeclaration|Variable Declaration]] | ||
+ | |||
+ | |||
+ | |||
+ | Source: arduino.cc | ||