[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|             PRIVATE             |
+---------------------------------+
PRIVATE <memvar list>

PRIVATE ALL
        [LIKE <skel> | EXCEPT <skel>]

-----------------------------------
Defines local memory variables or arrays.
-----------------------------------

PRIVATE hides memory variables or arrays defined in a previously
executed program from the current program.  The hiding of variables
created in higher-level programs allows variables of the same name as
the private variables to be manipulated without affecting the values of
the hidden variables.  Once the program containing PRIVATE has completed
execution, all memory variables and arrays made private are again
available.

        . Private does not create variables; it simply hides variables declared
in higher-level programs from the current program.

<memvar list>
        A list of memory variables or arrays to be declared PRIVATE.

PRIVATE ALL LIKE <skel>
        PRIVATE ALL LIKE <skel> hides all memory variables and arrays that
match <skel>.  The skeleton can contain the wild card characters ? and
*.

PRIVATE ALL EXCEPT <skel>
        The PRIVATE ALL EXCEPT <skel> hides all memory variables or arrays
unless they match the skeleton.  The skeleton can contain the wild card
characters ? and *.

+---------------------------------+
|         Program Example         |
+---------------------------------+
SET TALK OFF
val1 = 10
val2 = 15
DO down
? val1, ? val2

PROCEDURE down
PRIVATE val1
val1 = 50
val2 = 100
? '       Val1       Val2'
? val1, val2
RETURN

-----------------------------------

See Also:  DECLARE, DIMENSION, PARAMETERS, PARAMETERS(), PUBLIC, STORE

-----------------------------------

See Also: DECLARE DIMENSION PARAMETERS PARAMETERS() PUBLIC STORE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson