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

Private variable

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 01:19, 18 June 2007 (edit)
Sandman (Talk | contribs)

← Previous diff
Current revision (11:36, 27 December 2007) (edit) (undo)
Sandman (Talk | contribs)
m (Example)
 
(3 intermediate revisions not shown.)
Line 1: Line 1:
-[[Category:variablecategories]]+[[category:variablecategories]]
 +[[category:general]]
== Definition == == Definition ==
A private variable is a [[variable]] that is specific to a [[process]] or [[function]]. Unlike a [[public variable]], it can only be accessed from the process or function it was declared for. A private variable is a [[variable]] that is specific to a [[process]] or [[function]]. Unlike a [[public variable]], it can only be accessed from the process or function it was declared for.
 +
 +To start the declaration of private variables, use [[Private]].
== Example == == Example ==
Line 9: Line 12:
Private Private
int i,j; // declare private ints i and j int i,j; // declare private ints i and j
- String strtemp // declare privat string strtemp+ String strtemp; // declare private string strtemp
Begin Begin
// ... // ...
Line 15: Line 18:
End End
</pre> </pre>
 +Used in example: [[Function]], [[Private]], [[Begin]], [[End]]
 +
The private variables i and j could be variables used for counting and the string probably would have some use as well. The private variables i and j could be variables used for counting and the string probably would have some use as well.

Current revision


[edit] Definition

A private variable is a variable that is specific to a process or function. Unlike a public variable, it can only be accessed from the process or function it was declared for.

To start the declaration of private variables, use Private.

[edit] Example

Function int SomeFunction()
Private
    int i,j; // declare private ints i and j
    String strtemp; // declare private string strtemp
Begin
    // ...
    return 0;
End

Used in example: Function, Private, Begin, End

The private variables i and j could be variables used for counting and the string probably would have some use as well.

Personal tools