Distributed Systems Network Management (DSNM) Subsystem Interface Development Guide
_GET^LM
A-54
109759—Distributed Systems Network Management (DSNM) Subsystem Interface
Development Guide
DSNM Library Services
_GET^LM
_GET^LM removes the current first member (the earliest member put on the list) from a 
list and returns its address. If the list is empty, _GET^LM returns _NULL. 
list-member returned value
INT .EXT
is the address of the removed member.
list input 
is the name of a _LIST.
length output 
INT:ref
returns the length of the removed member, in bytes.
Considerations
•
Removing a member with _GET^LM does not immediately deallocate memory. 
The removed member's memory remains allocated and its contents useable until the 
next successive member is removed from the same end of the list, or a new member 
is added to the same end of the list.
•
The removed member does not participate in list scans with _SUCCESSOR^LM or 
_PREDECESSOR^LM.
•
Normally, a list is processed either by _PUT^LM plus _GET^LM or by _PUSH^LM 
plus _POP^LM, but not both.
•
_UNGET^LM replaces the last list member removed by _GET^LM.
Example
In the following example, the first member of outlist is removed and 
list^member is set to point to it:
_LIST (outlist);
INT .EXT list^member (list^member^def);
INT length; 
IF _ISNULL (@list^member := _GET^LM (outlist, length))
 THEN <empty list> ;
See the _FOBJECT^INIT description for another of example of _GET^LM.
@list-member := _GET^LM ( list
 ,[ length ] );










