![]() |
![]() |
![]() |
![]() |
OMFset array val
Synopsis
INTEGER FUNCTION OMFset array val(object id,
. index,
. value id)
#include <avs/omf.inc>
INTEGER object id(OIDSIZ), value id(OIDSIZ)
INTEGER indexDescription
For a complete description of this function, see OMset array val .Arguments
object idindexArray index that specifies the predefined parameter OM ARRAY APPEND appends the object value to the end of object id.
value idReturned value
The status code (see OMset array val).Examples
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
![]() |
![]() |
![]() |
![]() |