This wiki is out of date, use the continuation of this wiki instead

Constant

From FenixWiki

Revision as of 11:11, 1 March 2008 by Sandman (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

A constant is a container containing a value. This value cannot be changed apart from initialization, hence the name constant, as opposed to a variable of which the value can vary. A constant can be of any datatype and can contain a value according to its datatype. For example, an integer has whole numbers between -2^31 and +2^31-1 (e.g. 23) , a float has a floating point number (e.g. 2.674) and a string has a series of characters (e.g. "Hello World!").

There is a number of predefined constants. These variables are predefined, which means they exist without the programmer making them. They can be useful in a some functions or when assigning them to some global variables.

[edit] See Also

Personal tools