![]() |
![]() ![]() |
int GDget_newint_array ( parent_id , elem_name , seq, int * size , float ** array );
void GDset_int_array ( parent_id , elem_name , int size , float * array );
OMobj_id parent_id ;
char * elem_name ;
int * seq ;
GDget_int_array gets an integer array, placing the array's elements into array . The return value is 1 if successful, 0 if a failure.
GDget_newint_array gets an integer array, placing the array's elements into array . The routine also returns the array's updated sequence number. The return value is 1 if the data has changed, 0 if it has not.
GDset_int_array sets an integer array.
The id of the target subobject's parent.
The name of the target subobject.
In the GDget_xxxx routines, an output argument set to the number of values in the array.
In GDset_int_array, an input argument indicating the number of values in the array.
(GDget_newint_array only) An input/output argument. It is used to compare against the array's current sequence number to determine if the array has changed. It is then updated with the current sequence number.
In the GDget_xxxx routines, a pointer to the address where the routine places the array.
In GDset_int_array, the address of the source array.
/* Get, then set, the value of a modes object's mode subobject*/
OMobj_id modes_id; /* Assume this has been set. */
int size
int mode[5];
int status;
...
status = GDget_int_array(modes_id, "mode", &size, &mode);
if (status == 0) {
printf("Error getting the mode's mode subobject\n");
return(1);
};
/* Modify the array, then set the array object. */
mode[2] = 3;
GDset_int_array(modes_id, "mode", size, mode);
![]() |
![]() ![]() |