Real: Difference between revisions
Jump to navigation
Jump to search
InvaderZim (talk | contribs) No edit summary |
InvaderZim (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
[[category:variables]] | [[category:variables]] | ||
A '''real''' is a number [[variable]] that can store whole and decimal numbers. (examples are the float and double types) | A '''real''' is a number [[variable]] that can store whole and decimal numbers. (examples are the ''float'' and ''double'' types) | ||
The downside to using '''reals''' is that '''real''' [[variable]]s use more space than [[integer]] [[variable]]s do. '''Real''' [[variable]]s should be used for values that need to be as precise as possible. | The downside to using '''reals''' is that '''real''' [[variable]]s use more space than [[integer]] [[variable]]s do. '''Real''' [[variable]]s should be used for values that need to be as precise as possible. |
Revision as of 14:58, 6 August 2005
A real is a number variable that can store whole and decimal numbers. (examples are the float and double types)
The downside to using reals is that real variables use more space than integer variables do. Real variables should be used for values that need to be as precise as possible.
Examples include Health, Points (on a graph or map), Distance, and other such values that must be measured in precision.