The features described in this topic are obsolete
and should not be used in new IDL code.

HANDLE_INFO

This routine is obsolete and should not be used in new IDL code.

The HANDLE_INFO function returns information about handle validity and connectivity. By default, it returns True if the specified handle ID is valid. Keywords can be set to return other types of information.

Syntax

Result = HANDLE_INFO(ID)

Arguments

ID

The ID of the handle for which information is desired. This argument can be scalar or array an array of IDs. The result of HANDLE_INFO has the same structure as ID, and each element gives the desired information for the corresponding element of ID.

Keywords

FIRST_CHILD

Set this keyword to return the handle ID of the first child of the specified handle. If the handle has no children, 0 is returned.

NUM_CHILDREN

Set this keyword to return the number of children related to ID.

PARENT

Set this keyword to return the handle ID of the parent of the specified handle. If the specified handle is a top-level handle (i.e., it has no parent), 0 is returned.

SIBLING

Set this keyword to return the handle ID of the sibling handle following ID. If ID has no later siblings, or if ID is a top-level handle, 0 is returned.

VALID_ID

Set this keyword to return 1 if ID represents a currently valid handle. Otherwise, zero is returned. This is the default action for HANDLE_INFO if no other keywords are specified.

Examples

The following commands demonstrate a number of different uses of HANDLE_INFO:

;Print a message if handle1 is a valid handle ID. 
IF HANDLE_INFO(handle1) THEN PRINT, 'Valid handle.' 
;Retrieve the handle ID of the first child of top. 
handle = HANDLE_INFO(top, /FIRST_CHILD) 
;Retrieve the handle ID of the next sibling of handle1. 
next= HANDLE_INFO(handle1, /SIBLING)