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

HANDLE_VALUE

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

The HANDLE_VALUE procedure returns or sets the value of an existing handle.

Syntax

HANDLE_VALUE, ID, Value

Arguments

ID

A valid handle ID.

Value

When using HANDLE_VALUE to return an existing handle value (the default), Value is a named variable in which the value is returned.

When using HANDLE_VALUE to set a handle value, Value is the new value. Note that handle values can have any IDL data type and organization.

Keywords

NO_COPY

By default, HANDLE_VALUE works by making a second copy of the source data. Although this technique is fine for small data, it can have a significant memory cost when the data being copied is large.

If the NO_COPY keyword is set, HANDLE_VALUE works differently. Rather than copy the source data, it takes the data away from the source and attaches it directly to the destination. This feature can be used to move data very efficiently. However, it has the side effect of causing the source variable to become undefined. On a retrieve operation, the handle value becomes undefined. On a set operation, the variable passed as Value becomes undefined.

SET

Set this keyword to assign Value as the new handle value. The default is to retrieve the current handle value.

Example

The following commands demonstrate the two different uses of HANDLE_VALUE:

; Retrieve the value of handle1 into the variable current: 
HANDLE_VALUE, handle1, current 
; Set the value of handle1 to a 2-element integer vector: 
HANDLE_VALUE,handle1,[2,3],/SET