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

Local variable

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:12, 16 April 2007 (edit)
Sandman (Talk | contribs)
m (Fixed the adding of the Category "local variables")
← Previous diff
Revision as of 16:57, 25 July 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 1: Line 1:
-#REDIRECT [[:Category:local variables]]+[[Category:variablecategories]]
 + 
 +== Definition ==
 +A local variable is a [[variable]] that is specific to a [[process]] in the same way as a [[public variable]]: they are both accessible from other places in the code than the [[process]]/[[function]] itself. However, unlike a public variable, when a local variable is declared, ''all'' following processes will have that local.
 + 
 +Note that in most versions of Fenix the first local variable to be defined is bugged and will cause the program to crash if used. To avoid this, the first local to be declared by the user should not be used, but instead be a garbage variable.
 + 
 +There's also a number of [[predefined]] local variables, which are listed below.
 + 
 +== Example ==
 +<pre>
 +Program example;
 +Const
 + someconstantvariable;
 +Global
 + int globalint;
 + string globalstring;
 + //etc...
 +Local
 + int UNUSED; //this variable is not used as it is bugged
 + //[insert local variables that you can use here]
 +Begin
 + //rest of program...
 +End

Revision as of 16:57, 25 July 2007


Definition

A local variable is a variable that is specific to a process in the same way as a public variable: they are both accessible from other places in the code than the process/function itself. However, unlike a public variable, when a local variable is declared, all following processes will have that local.

Note that in most versions of Fenix the first local variable to be defined is bugged and will cause the program to crash if used. To avoid this, the first local to be declared by the user should not be used, but instead be a garbage variable.

There's also a number of predefined local variables, which are listed below.

Example

Program example;
Const
    someconstantvariable;
Global
    int globalint;
    string globalstring;
    //etc...
Local
    int UNUSED; //this variable is not used as it is bugged
    //[insert local variables that you can use here]
Begin
    //rest of program...
End
Personal tools