# Guide to Game Development/The Programming Language/VB.NET/Variables
## Different types of Variables

This a table of all the different data types that a variable can be, you don't need to remember all of these, just a few.
For now, just try and remember these:
* Integer
* Double
* Boolean
* Char
* String
Whole Numbers :
| The key thing here is to select the smallest one that you can run your program with to save resources, this is especially important with game development as a lot of RAM will be used. |||
| Byte | 8-bits | Unsigned byte: Can hold numbers in range: 0 to 255 (same as 0 to $2^{8}-1$) |
| SByte | 8-bits | Signed byte: Can hold numbers in range: -128 to 127 (same as $-2^{7}$ to $2^{7}-1$) |
| Short | 16-bits | Signed short: Can hold numbers in range: -32,768 to 32,767 (same as $-2^{15}$ to $2^{15}-1$) |
| UShort | 16-bits | Unsigned short: Can hold numbers in range: 0 to 65,535 (same as 0 to $2^{16}-1$) |
| Integer | 32-bits | Signed Integer: Can hold numbers in range: -2,147,483,648 to 2,147,483,647 (same as $-2^{31}$ to $2^{31}-1$) |
| UInteger | 32-bits | Unsigned Integer: Can hold numbers in range: 0 to 4,294,967,295 (same as 0 to $2^{32}-1$) |
| Long | 64-bits | Signed Long: Can hold numbers in range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (same as $-2^{63}$ to $2^{63}-1$) |
| ULong | 64-bits | Unsigned Integer: Can hold numbers in range: 0 to 18,446,744,073,709,551,615 (same as 0 to $2^{64}-1$) |
| Decimal Numbers |||
| The key thing here is to select the smallest one that you can run your program with to save resources, this is especially important with game development as a lot of RAM will be used. |||
| Single | 32-bits | single-precision floating-point numbers ranging in value from -3.4028235E+38 through -1.401298E-45 for negative values and from 1.401298E-45 through 3.4028235E+38 for positive values. |
| Double | 64-bits | double-precision floating-point numbers that range in value from -1.79769313486231570E+308 through -4.94065645841246544E-324 for negative values and from 4.94065645841246544E-324 through 1.79769313486231570E+308 for positive values. |
| Decimal | 128-bits | Holds signed 128-bit (16-byte) values representing 96-bit (12-byte) integer numbers scaled by a variable power of 10. The scaling factor specifies the number of digits to the right of the decimal point; it ranges from 0 through 28. With a scale of 0 (no decimal places), the largest possible value is +/-79,228,162,514,264,337,593,543,950,335 (+/-7.9228162514264337593543950335E+28). With 28 decimal places, the largest value is +/-7.9228162514264337593543950335, and the smallest nonzero value is +/-0.0000000000000000000000000001 (+/-1E-28). |
| Text |||
| Char | 16-bits | Can hold one of 65536 Unicode character. |
| String | 16-bits per character | Can hold many of the 65536 Unicode characters available in an order. |
| Boolean |||
| Boolean | 1-bit | Holds a True/False state (0 or 1), one binary digit. |
| Miscellaneous |||
| Date | 64-bit | Can hold one date and time. |

## Declaration of a variables

You can create a variable with the following format:
Examples:
If you want to make many variables of the same data type it can be done like so:
Example:

## Setting the value for a variable

There are two way which you can set the state of a variable:
* On the declaration line
* Standalone statement
* Standalone statement mixed with math (will be shown at a later date).
Example of setting value on a declaration line:
Example of setting value as a standalone statement:
Example:
This code:
Will output:

## Naming conventions

When naming variables, you should name them using lower camel case
thisIsWhereYouWriteVariablesLikeThis
itIsLowerBecauseTheFirstLetterIsLowerCase

## References

* ↑ http://msdn.microsoft.com/en-us/library/xay7978z.aspx
* ↑ http://msdn.microsoft.com/en-us/library/x99xtshc.aspx
* ↑ http://msdn.microsoft.com/en-us/library/xtba3z33.aspx
* ↑ http://msdn.microsoft.com/en-us/library/3eaydw6e.aspx
* ↑ http://c2.com/cgi/wiki?LowerCamelCase