|
hello, everyone. I have heard int before but i dont know what it is and what it is used for. Can you guys possebly cast som light upon this, please? Thanks!
(comments are locked)
|
|
In Unity's Javascript and C#, int is a type. It is short for "integer", which means whole numbers. You use int to specify that you want your variable to contain only whole numbers. For example, 3 is an integer. 3.25 is not an integer. When programming, your variables generally have a specific type, and you should select the appropriate type according to what you want to use the variable for. Four of the most common types are:
There are many more types that you can use for variables, including other numeric types for more specific situations, and other more complex types such as structs and classes which you will need to learn about in order to make progress using Unity. Good luck :)
(comments are locked)
|
|
int just mean integer, which means number Eg: var Number : int = 4; just means that the Number var only holds a number variable. A variable can hold anything. Int just means that the variable is only limited to numbers just to add on, the integer is the same one we learn in our math classes. Integers are essentially whole numbers.
Nov 17 '10 at 04:30 PM
denewbie
(comments are locked)
|

Go ask generic-programming questions at http://stackoverflow.com
So fireDude67 I assume that you edited this post, right? But how is this not Unity related?