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

Local variable

From FenixWiki

Revision as of 19:59, 12 January 2008 by Sandman (Talk | contribs)
Jump to: navigation, search


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 earlier versions of Fenix (Fenix 0.84b and before) 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.

To start the declaration of local variables, use Local.

Example

Program example;
Local
    // For versions 0.84a and before declare a garbage variable here
    // insert local variables that you can use here
Begin
    //rest of program...
End

Used in example: Program, Local, Begin, End

Personal tools