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

set_idl_variable

Syntax

int set_idl_variable(CLIENT* client, varinfo_t* var); 

Description

Call this function to assign a value to an IDL variable in the IDL session referred to by client. The address var points to a varinfo_t structure that contains information about the variable to be set. The "helper" functions can be used to build var. (See The varinfo_t Structure) Any scalar or array variable type can be set. Variables can be set only in the main IDL program level.

Note that it is not possible to set the value of an IDL structure. To set values in an IDL structure, set the individual elements of the structure to scalar IDL variables, then use the send_idl_command function to create the structure in IDL.

It is not possible to set the value of IDL system variables directly. To set the value of an IDL system variable, first set the value of a regular IDL variable. The value of the regular variable can then be assigned to the system variable. For example:

set_idl_variable(client, &newvar); /* newvar describes the */
                                  /* IDL variable "NEW" */
send_idl_command(client, "!P.T = NEW"); 

Parameters

client

A pointer to the CLIENT structure that corresponds to the desired IDL session.

var

The address of the varinfo_t structure that contains information about the variable to be set.

Return Value

This function returns a status value that denotes the success or failure of this function as described below.