OMFret_array_ptr

Synopsis


INTEGER FUNCTION OMFret_array_ptr(object_id,
. mode,
. size,
. type)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER mode
INTEGER size, type

Description

For a complete description of this function, see OMret_array_ptr .

Arguments

object_id
The id of an object, expressed as an integer.
mode
An integer specifying the mode in which to retrieve the the value for the array. The following constants are predefined in the include file omf.inc :I. OM_GET_ARRAY_RD OM_GET_ARRAY_RD_COPY OM_GET_ARRAY_RW OM_GET_ARRAY_WR
size
The total number of values in the array, expressed as an integer. In order to pass the NULL reference, set the value to FPNULL (defined in the include file omf.inc ).
type
Integer code for the array's data type. In order to pass the NULL reference, set the value to FPNULL (defined in the include file omf.inc ).

Returned value

The memory location of the returned array. On failure, 0 is returned.

Examples

none.

C return the array value of object array for RW access
#include <avs/omf.inc>
     INTEGER array_id(OIDSIZ)
INTEGER type, iaddr, offset, size
REAL base(1)
...
iaddr = OMFret_array_ptr(array_id,
. OM_GET_ARRAY_RW,
. size,
. type)
IF (iaddr .EQ. 0) THEN
PRINT*,'Error getting array value of object array'
...
ENDIF
C
C _continue only for iaddr .ne. 0
offset = ARRFoffset(iaddr,base,DTYPE_FLOAT)
C
C _set the values of the array
...
CALL ARRFfree(iaddr)

See Also

none.