- This wiki is out of date, use the continuation of this wiki instead
Variable
From FenixWiki
Revision as of 18:03, 25 July 2007 (edit) Sandman (Talk | contribs) m (Redirecting to Variables) ← Previous diff |
Revision as of 11:04, 1 March 2008 (edit) (undo) Sandman (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
- | + | A variable is a container containing a [[value]]. This value can vary, hence the name variable, as opposed to a [[constant]] of which the value cannot be changed. A variable 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 variables]], like [[local variable]]s and [[global variable]]s. These variables are predefined, which means they exist without the programmer making them. They can contain useful information or perform an action when changed. | ||
+ | |||
+ | A [[function]] or [[process]] can accept values when called. The value it's called with is called an [[argument]] and the variable or value inside the function or process is called a [[parameter]]. |
Revision as of 11:04, 1 March 2008
A variable is a container containing a value. This value can vary, hence the name variable, as opposed to a constant of which the value cannot be changed. A variable 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 variables, like local variables and global variables. These variables are predefined, which means they exist without the programmer making them. They can contain useful information or perform an action when changed.
A function or process can accept values when called. The value it's called with is called an argument and the variable or value inside the function or process is called a parameter.