Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Introduction to External Program Interfaces : Using MEMPTR to reference external data : Initializing and uninitializing MEMPTR variables : Checking a MEMPTR variable for initialization
 
Checking a MEMPTR variable for initialization
You might not be sure whether a particular MEMPTR variable is already initialized when you try to initialize it. You can verify that the variable is initialized and obtain the size of its memory region using the GET-SIZE function. This is the syntax for the GET-SIZE function:

Syntax

GET-SIZE ( mptr-name )
If mptr-name is initialized, the GET-SIZE function returns the size of its memory region. Otherwise, it returns zero (0).
Note: To return a memory size greater than zero (0), the variable must be fully initialized with the SET-SIZE statement, not just allocated by a shared library routine.