Can someone explain the real purpose of each attribute.
Hello everyone:
I been here almost a year and I never fully understood the real purpose on each attribute. I almost all the time use interger and in a few occasions I use other like boolean and real but only because a tutorial told me to and I don't understand why.
I friend of mine ask me today when was best to use boolean and I didn't know what to answer.
Can someone explain when its best to use every one of them and why.
Thanks a lot.
I been here almost a year and I never fully understood the real purpose on each attribute. I almost all the time use interger and in a few occasions I use other like boolean and real but only because a tutorial told me to and I don't understand why.
I friend of mine ask me today when was best to use boolean and I didn't know what to answer.
Can someone explain when its best to use every one of them and why.
Thanks a lot.
Comments
Real can be positive, negative, and have decimals: 0.5 , -1.5 , 3.9
Angles can be a value from 0 to 360.
Booleans are true or false.
Text stores text as the value: "hello world"
And index are whole positive numbers im pretty sure
Back to my projects to do some mayor changes.
I know there are a lot of rules in them that has intergers when they could be boolean.
Boolean is binary, which is one bit in size and can be processed very quickly by a cpu. Sometimes this can help with readability too. If true and false better describes a state than 2 numbers could, you might as well use Boolean.
Integers are whole numbers and can be negative, they are 32 bits I think...
Real numbers can have decimals, and use significantly more memory and processing power. One warning with real numbers is that they are not exact. The decimals cut off after so many places. So .3333333333333 is not 1 third, and could eventually lead to errors.
Angles are real numbers between 0 and 360 I think... I never use that type.
Strings are groups of characters, like words, sentences. They're usually used for I/O, and can use more memory than ints and reals, but are usually used less.
Index is non negative integers.
http://cookbook.gamesalad.com/?token=&tokenUsername=#question=4d9e10a05e76e16053000326