Synopsis
INTEGER FUNCTION OMFset_array_val(object_id,
. index,
. value_id)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ), value_id(OIDSIZ)
INTEGER index
Description
For a complete description of this function, see .
Arguments
object_id
The id of an object, expressed as an integer.
index
Array index that specifies the predefined parameter OM_ARRAY_APPEND appends the object value to the end of object_id.
value_id
The id of the object to be placed in the array, expressed as an integer.
Returned value
The status code (see ).
Example
A V file contains the following definitions:
group a;
group b;
group c;
group d;
group &grps[] => {a,b,c};
The following code illustrates how to set a value in grps:
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ)
INTEGER a_id(OIDSIZ), b_id(OIDSIZ), c_id(OIDSIZ), d_id(OIDSIZ)
INTEGER grps_id(OIDSIZ), tmp_id(OIDSIZ)
...
IF (OMFfind_subobj(parent_object,
. OMFstr_to_name('grps'),
. OM_OBJ_RW,
. grps_id) .NE. 1)
. PRINT*,'Error searching for grps'
C
IF (OMFfind_subobj(parent_object,
. OMFstr_to_name('d'),
. OM_OBJ_RD,
. d_id) .NE. 1)
. PRINT*,'Error searching for d'
C
IF (OMFset_array_val(grps_id,1,d_id,OM_OBJ_RD) .NE. 1)
. PRINT*,'Error setting array value with index 1'
See also
Related modules: