![]() |
![]() |
![]() |
![]() |
GDget_int_array
Synopsis
int _ GDget_int_array ( parent_id , _ elem_name , _int * size , _float ** array );
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 ;Description
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.
Parameters
(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.
Example
/* 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);
![]() |
![]() |
![]() |
![]() |