Synopsis
INTEGER FUNCTION OMFget_array_val(object_id,
. index,
. value_id,
. mode)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER index, mode
INTEGER value_id(OIDSIZ)
Description
For a complete description of this function, see .
Arguments
object_id
The id of an object, expressed as an integer.
index The array index.
value_id
The id of the specified object, expressed as an integer.
mode
Indication of how the process intends to use the object. The following constants are predefined in the include file omf.inc :
Mode
|
Meaning
|
OM_OBJ_RD |
The process intends to read the object, but not write to it (or any object that it might get using this id). |
OM_OBJ_RW |
The process intends to read and possibly write to the object. |
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 access the values 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_RD,
. grps_id) .NE. 1)
. PRINT*,'Error searching for grps'
C
IF (OMFget_array_val(grps_id,0,tmp_id,OM_OBJ_RD) .NE. 1)
. PRINT*,'Error getting array value with index 0'
See also
Related modules: