Difference between revisions of "LOCAL"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
=LOCAL=
 
 
 
 
==Class==
 
==Class==
 
Memory Variables
 
Memory Variables
Line 40: Line 37:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 +
[[Category:Memory Variables]]
 +
[[Category:Memory Variables Commands]]

Revision as of 15:39, 3 June 2009

Class

Memory Variables


Purpose

Declare a memory variable or array local to the current procedure


Syntax

LOCAL <memvar list> | <array name>


See Also

DECLARE, DIMENSION, DISPLAY MEMORY, DO, FUNCTION, PRIVATE, PROCEDURE, PUBLIC, RELEASE, RESTORE, SAVE, SET CLIPPER, STORE


Description

The LOCAL command declares memory variables or arrays to be local to a procedure, function or program. When the procedure, function or program returns, then all of the memory variables and arrays that were declared by the LOCAL command are released.

The memory variables are initially declared as logicals with the value .F., unless SET CLIPPER is ON, in which case they are undefined.

LOCAL variables differ from PRIVATE variables in that a LOCAL variable is not visible to lower level procedures or functions.

See DECLARE or DIMENSION for more details on array declaration.


Example

local cTmpbuf
? cTmpbuf
.F.


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer