Difference between revisions of "LOCAL"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
Line 1: Line 1:
 
 
 
==Purpose==
 
==Purpose==
 
Declare a memory variable or array local to the current procedure
 
Declare a memory variable or array local to the current procedure
Line 32: Line 30:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital Server, Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Memory Variables]]
 
[[Category:Memory Variables]]
 
[[Category:Memory Variables Commands]]
 
[[Category:Memory Variables Commands]]

Revision as of 17:15, 11 November 2009

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 Server, Recital