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

Constant

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 14:37, 1 May 2007 (edit)
Sandman (Talk | contribs)

← Previous diff
Current revision (11:11, 1 March 2008) (edit) (undo)
Sandman (Talk | contribs)

 
(One intermediate revision not shown.)
Line 1: Line 1:
-#REDIRECT [[:Category:constants]]+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 variable]]s.
 + 
 +== See Also ==
 +* [[constants|A list of predefined constants]]
 +* [[Variable]]
 + 
 +[[Category:General]]

Current revision

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