PRIVATE |
![]() ![]() ![]() |
The PRIVATE statement defines private variables in a local subroutine or in a class module.
Format
PRIVATE var, mat(rows, cols)
where
The PRIVATE statement has two uses:
Immediately after the LOCAL statement defining a local function or subroutine. It identifies variables that have scope only within the local routine and are discarded on exit. If the routine calls itself recursively, each invocation has its own private variables. See the LOCAL statement for more details.
Used in a CLASS module, it defines variables that are private to the object but persist between successive executions of components of the class module. See the CLASS statement and Object Oriented Programming for more details.
See also: Object oriented programming, CLASS, DISINHERIT, INHERIT, OBJECT(), PUBLIC. |