![]() |
![]() |
![]() |
![]() |
D Object Manager
FORTRAN Application Programming Interface
This appendix describes the subset of the AVS/Express Object Manager API provided for FORTRAN programmers.
Note: The FORTRAN API is derived from the C API which is comprehensively documented in Appendix 1, Object Manager Application Programming Interface.
Wherever possible and feasible, the FORTRAN API functions are one-to-one translations of their C counterparts. In most cases, the function names are equivalent and are generated by extending the prefix OM to OMF.
Each FORTRAN API function description consists of the specification of the function itself and its arguments, a reference to the corresponding C API documentation and a brief description of the arguments and the return value. Differences in functionality or arguments, as well as specific FORTRAN behavior, are given in full detail.
AVS/Express assigns each object a unique id which is of type OMobj_id in a C API function (see Section 1.3, Object id [page 1-16]). The FORTRAN API represents the OMobj_id in terms of an integer array of sufficient size. In order to be safe, the include file omf.inc defines the size via the parameters OM_OBJ_ID_SIZE or OIDSIZ which are recommended to be used. In order to provide the values of some standard objects, omf.inc defines the following set of OMobject_ids:
INTEGER OMnull_obj(OIDSIZ),
INTEGER OMroot_obj(OIDSIZ),
INTEGER OMinst_obj(OIDSIZ),
INTEGER OMtempl_obj(OIDSIZ)
COMMON /OMF/ OMnull_obj, OMroot_obj, OMinst_obj, OMtempl_obj
The values of these variables are not initialized by default but you can set them by making the call
AVS/Express objects have a name which is stored in terms of a unique integer value (see Section 1.4, Object names [page 1-18]). Accordingly, the OMobj_name type is represented as an INTEGER type in the FORTRAN API.
The FORTRAN include file omf.inc contains predefined values specified via PARAMETER statements and the function type declarations. Most functions are of type INTEGER but don't follow implicit type declaration conventions. It is therefore important to include omf.inc whenever API functions are being used.
The examples in the descriptions of the API functions use the preprocessor statement
to include the file. SGI f77 calls the preprocessor automatically, on Sun and HP the filename extension ".F" is required to correctly resolve the statement. Alternatively, a $INCLUDE statement or a FORTRAN statement INCLUDE may be available and used.
Most API functions return a status code (see Section 1.7, Return status [page 1-22]) which is defined in omf.inc by the following constants:
In some cases, an indicator value is returned which has a particular meaning which differs from the status code.
The full array access mechanism provided in the C API is supported for FORTRAN arrays of type INTEGER, REAL, and DOUBLE PRECISION. The memory organization of an array is thereby conserved. For multi-dimensional arrays specified in AVS/Express as float xyz[n1][n2];, the corresponding FORTRAN representation is REAL xyz(n2,n1).
Some C API routines expect or return pointers to memory locations. For efficiency reasons, a corresponding mechanism is required by the FORTRAN API. Since FORTRAN77 doesn't have a standard (and therefore portable) pointer type, the address of a memory location is represented in terms of an INTEGER type. In cases where the address of an allocated memory area is returned, a function for the translation into an offset relative to a specified memory location is provided. Another utility function returns the address of a storage area for the purpose of passing a FORTRAN array location to the Object Manager.
Note: Array indexing in AVS/Express is zero-based, that is, the first element of an array object has the index 0. This is important when addressing particular array elements or ranges via an API function.
The following table summarizes the FORTRAN APIs by function.
INTEGER FUNCTION ARRFalloc (N1,
. type,
. number_of_elements,
. N2)
INTEGER N1, N2
INTEGER type, number_of_elements
For a complete description of this function, see Section 1.8, ARRalloc [page 1-23].
An integer code specifying the data type for which to allocate memory. All type codes are predefined in the include file omf.inc. The meaningful codes in the FORTRAN context are:
The number of elements to be stored in the allocated memory, expressed as an integer.
Both N1 and N2 should be set to 0.
The address of the allocated memory area or 0 if the call fails.
#include <avs/omf.inc>
INTEGER iaddr
...
iaddr = ARRFalloc(0,DTYPE_FLOAT,2000,0)
IF (iaddr .EQ. 0) PRINT*,'Error allocating memory area'
For a complete description of this function, see Section 1.9, ARRfree [page 1-25].
The address of a memory location, expressed as an integer.
#include <avs/omf.inc>
INTEGER iaddr
...
iaddr = ARRFalloc(0,DTYPE_FLOAT,2000,0)
IF (iaddr .EQ. 0) PRINT*,'Error allocating memory area'
call ARRFfree(iaddr)
For a complete description of this function, see Section 1.10, ARRincr_refcnt [page 1-26].
The address of a memory area allocated with ARRFalloc, expressed as an integer.
#include <avs/omf.inc>
INTEGER iaddr
...
iaddr = ARRFalloc(0,DTYPE_FLOAT,2000,0)
IF (iaddr .EQ. 0) PRINT*,'Error allocating memory area'
call ARRFincr_refcnt(iaddr)
This routine enables FORTRAN programmers to access memory locations specified by a pointer in a portable manner.
The address of a memory area allocated with ARRFalloc or returned by ARRFretptr or by one of the get_array access routines described below (expressed as an integer).
A local array, used as a reference location. This array can be dimensioned with one element.
A code for the data type of the local array basevec, expressed as an integer. It is used to compute the correct addressing offset according to the size of the elements of the local array. The meaningful codes predefined in the include file omf.inc are:
The addressing offset of an allocated memory area with respect to the first element of basevec.
C Allocate a memory area and fill some values in
#include <avs/omf.inc>
INTEGER iaddr, offset, size
REAL base(1)
...
size = 2000
iaddr = ARRFalloc(0,DTYPE_FLOAT,size,0)
IF (iaddr .EQ. 0) PRINT*,'Error allocating memory area' offset = ARRFoffset(iaddr,base,DTYPE_FLOAT)
C
DO 100 i=1,size base(offset+i) = FLOAT(i)
100 CONTINUE
This function returns the address of a local memory location. It is required to pass locally defined arrays to AVS/Express.
The address of the first element of farray.
INTEGER FUNCTION OMFdel_array_val (object_id,
. value_id)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ), value_id(OIDSIZ)
For a complete description of this function, see Section 1.43, OMget_array_val, OMset_array_val, OMdel_array_val [page 1-89].
The id of an object, expressed as an integer.
The id of the object to be deleted from the array, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
A V file contains the following definitions:
The following code illustrates how to delete 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 (OMFget_array_val(grps_id,1,tmp_id,OM_OBJ_RD) .NE. 1)
. PRINT*,'Error getting array value with index 1'
IF (OMFdel_array_val(grps_id,tmp_id) .NE. 1)
. PRINT*,'Error deleting array value with index 1'
INTEGER FUNCTION OMFequal_objs (object1_id,
. object2_id)
#include <avs/omf.inc>
INTEGER object1_id(OIDSIZ)
INTEGER object2_id(OIDSIZ)
For a complete description of this function, see Section 1.33, OMequal_objs [page 1-65].
The ids of the objects to be compared, expressed as integers.
1 if the object ids are the same; 0 if the object ids are not the same. OM_STAT_ERROR on failure.
INTEGER FUNCTION OMFfind_subobj (parent_id,
. name,
. mode,
. returned_id)
#include <avs/omf.inc>
INTEGER parent_id(OIDSIZ)
INTEGER name, mode
INTEGER returned_id(OIDSIZ)
For a complete description of this function, see Section 1.36, OMfind_subobj, OMlookup_subobj and OMfind_obj [page 1-69].
The id of an object, as an integer value.
The unqualified name of an object as an integer value.
Indication of how the process intends to use the object. The following constants are predefined in the include file omf.inc:
The id of the found object or OMnull_obj on failure.
1 on success; 0 if OMnull_obj is returned.
C Find subobject x. Its parent's id is grp1_id.
#include <avs/omf.inc>
INTEGER grp1_id (OIDSIZ), x_id(OIDSIZ)
...
IF (OMFfind_subobj(grp1_id,
. OMFstr_to_name('x'),
. OM_OBJ_RD,
. x_id) .NE. 1) PRINT*,'Err searching for x'
INTEGER FUNCTION OMFfind_obj (parent_id,
. name,
. mode,
. returned_id)
#include <avs/omf.inc>
INTEGER parent_id(OIDSIZ)
INTEGER name, mode
INTEGER returned_id(OIDSIZ)
For a complete description of this function, see Section 1.36, OMfind_subobj, OMlookup_subobj and OMfind_obj [page 1-69].
The id of an object, as an integer value.
The unqualified name of an object as an Integer value.
Indication of how the process intends to use the object. The following constants are predefined in the include file omf.inc:
The flags to qualify the object search are:
The id of the found object or OMnull_obj on failure.
1 on success; 0 if OMnull_obj is returned.
INTEGER FUNCTION OMFget_array (object_id,
. type,
. array_ptr,
. ndims,
. dims,
. mode)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER type, ndims, mode
INTEGER dims(ndims)
INTEGER array_ptr
For a complete description of this function, see Section 1.38, OMget_array [page 1-74].
The id of an object, expressed as an integer.
An integer code specifying the array's data type. Valid types predefined in the include file omf.inc are:
The memory location of the returned array, expressed as an integer. A local memory location can be passed by using the ARRFretptr function. A NULL pointer is passed by setting the address to 0; AVS/Express returns a memory location of its choosing.
The number of dimensions in the array, expressed as an integer.
An array of ndim integer values specifying the dimensions of the array. The constant OM_ARRAY_MAXDIM defined in the include file omf.inc specifies the maximum number of dimensions allowed by AVS/Express.
The mode in which to retrieve the the value for the array. The following constants are predefined in the include file omf.inc:
The status code (see Section 1.7, Return status [page 1-22]).
C set the array value of object array
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER type, iaddr, offset, ndims
INTEGER dims(OM_ARRAY_MAXDIM)
REAL base(1)
...
C the AVS/Express specification will be: float array[300][3];
C this maps to REAL array(3,300) in FORTRAN
type = OM_TYPE_FLOAT
iaddr = 0 ndims = 2 dims(1) = 3 dims(2) = 300
C
IF (OMFget_array(array_id,
. type,
. iaddr,
. ndims,
. dims,
. OM_GET_ARRAY_WR) .NE. 1) THEN
PRINT*,'Error getting array value of object array'
...
ENDIF
C
C continue only when successfully retrieved the array
offset = ARRFoffset(iaddr,base,DTYPE_FLOAT)
C
C set the values of the array
...
CALL ARRFfree(iaddr)
C return the array value of object array into a static location
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER type, iaddr, size, ndims
INTEGER dims(OM_ARRAY_MAXDIM)
REAL larray(1000)
...
C check for sufficient size
IF OMFget_array_size(array_id,size) .NE. 1)
. PRINT*,'Error getting array size'
IF (size .LT. 1000) PRINT*,'Not enough space in local array'
C
iaddr = ARRFretptr(larray)
type = OM_TYPE_FLOAT
ndims = 0
IF (OMFget_array(array_id,
. type,
. iaddr,
. ndims,
. dims,
. OM_GET_ARRAY_RD) .NE. 1)
. PRINT*,'Error getting array value of object array'
C
INTEGER FUNCTION OMFset_array (object_id,
. type,
. farray,
. size,
. mode)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER type, size, mode
DIMENSION farray(1)
For a complete description of this function, see Section 1.99, OMset_array [page 1-187].
The id of an object, expressed as an integer.
An integer code specifying the array's data type. Valid types predefined in the include file omf.inc are:
The total number of values in the array, expressed as an integer.
How AVS/Express should set the array. The following constants are predefined in the include file omf.inc:
If set to OM_SET_ARRAY_STATIC, farray has to be a static array (notice that some FORTRAN compilers do not perform static memory allocation by default). If set to OM_SET_ARRAY_COPY, farray needs not to be a static array since AVS/Express creates a copy.
The status code (see Section 1.7, Return status [page 1-22]).
A standard application of OMFset_array:
#include <avs/omf.inc>
INTEGER sarray_id(OIDSIZ) larray_id(OIDSIZ)
DOUBLE PRECISION sarray(500)
INTEGER larray(3,100)
...
C sarray has to be a static array to make the following work
C correctly. The call will not fail if this condition is not
C satisfied.
C
IF (OMFset_array(sarray_id,
. OM_TYPE_DOUBLE,
. sarray,
. 500,
. OM_SET_ARRAY_STATIC) .NE. 1)
. PRINT*,'Error setting array value of object sarray'
C
IF (OMFset_array(larray_id,
. OM_TYPE_INT,
. larray,
. 300,
. OM_SET_ARRAY_COPY) .NE. 1)
. PRINT*,'Error setting array value of object larray'
The construction required to pass a memory area allocated by ARRFalloc:
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER iaddr, offset, size
DOUBLE PRECISION base(1)
...
size = 300
iaddr = ARRFalloc(0,DTYPE_DOUBLE,size,0)
offset = ARRFoffset(iaddr,base,DTYPE_DOUBLE)
...
C
IF (OMFset_array(array_id,
. OM_TYPE_DOUBLE,
. base(1+offset),
. 300,
. OM_SET_ARRAY_FREE) .NE. 1)
. PRINT*,'Error setting array value of object array'
INTEGER FUNCTION OMFget_array_dims (object_id,
. ndims,
. dims)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER ndims
INTEGER dims(ndims)
For a complete description of this function, see Section 1.39, OMget_array_dims [page 1-81].
The id of an object, expressed as an integer.
The number of dimensions in the array, expressed as an integer.
An array of ndim integer values specifying the dimensions of the array. The constant OM_ARRAY_MAXDIM defined in the include file omf.inc secifies the maximum number of dimensions allowed by AVS/Express. In order to pass the NULL reference instead of a locally defined array, pass the constant FPNULL defined in the include file omf.inc.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER ndims
INTEGER dims(OM_ARRAY_MAXDIM)
...
IF (OMFget_array_dims(array_id,
. ndims,
. dims) .NE. 1)
. PRINT*,'Error getting array dimensions of object array'
INTEGER FUNCTION OMFget_array_size (object_id,
. size)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER size
For a complete description of this function, see Section 1.41, OMget_array_size and OMset_array_size [page 1-85].
The id of an object, expressed as an integer.
The total number of values in the array, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER size
...
IF OMFget_array_size(array_id,size) .NE. 1)
. PRINT*,'Error getting array size'
INTEGER FUNCTION OMFset_array_size (object_id,
. size)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER size
For a complete description of this function, see Section 1.41, OMget_array_size and OMset_array_size [page 1-85].
The id of an object, expressed as an integer.
The number of values in the one-dimensional array, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER size
...
size = 250
IF OMFset_array_size(array_id,size) .NE. 1)
. PRINT*,'Error getting array size'
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)
For a complete description of this function, see Section 1.43, OMget_array_val, OMset_array_val, OMdel_array_val [page 1-89].
The id of an object, expressed as an integer.
The id of the specified object, expressed as an integer.
Indication of how the process intends to use the object. The following constants are predefined in the include file omf.inc:
The status code (see Section 1.7, Return status [page 1-22]).
A V file contains the following definitions:
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'
INTEGER FUNCTION OMFset_array_val (object_id,
. index,
. value_id)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ), value_id(OIDSIZ)
INTEGER index
For a complete description of this function, see Section 1.43, OMget_array_val, OMset_array_val, OMdel_array_val [page 1-89].
The id of an object, expressed as an integer.
Array index that specifies the predefined parameter OM_ARRAY_APPEND appends the object value to the end of object_id.
The id of the object to be placed in the array, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
A V file contains the following definitions:
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'
INTEGER FUNCTION OMFget_data_type (object_id,
. data_type)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER data_type
For a complete description of this function, see Section 1.45, OMget_data_type and OMset_data_type [page 1-95].
The id of an object, expressed as an integer.
The new data type of the object, expressed as an integer. The FORTRAN API supports the following codes which are predefined in the include file omf.inc:
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER data_id(OIDSIZ)
INTEGER type
...
IF (OMFget_data_type(data_id, type) .NE. 1)
. PRINT*,'cannot get data type'
INTEGER FUNCTION OMFset_data_type (object_id,
. data_type)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER data_type
For a complete description of this function, see Section 1.45, OMget_data_type and OMset_data_type [page 1-95].
The id of an object, expressed as an integer.
The new data type of the object, expressed as an integer. The FORTRAN API supports the following codes which are predefined in the include file omf.inc:
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER data_id(OIDSIZ)
...
IF (OMFset_data_type(data_id, OM_TYPE_FLOAT) .NE. 1)
. PRINT*,'cannot set data type'
INTEGER FUNCTION OMFget_int_val (object_id,
. ival)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER ival
For a complete description of this function, see Section 1.48, OMget_int_val and OMset_int_val [page 1-100].
The id of an object, expressed as an integer.
The object's value, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ), ival_id(OIDSIZ)
INTEGER value
...
IF (OMFfind_subobj(parent_object,
. OMstr_to_name('ival'),
. OM_OBJ_RD,
. ival_id) .NE. 1)
. PRINT*,'Error searching for ival'
C
IF (OMFget_int_val(ival_id,value) .NE. 1)
. PRINT*,'Error getting value of object ival'
INTEGER FUNCTION OMFset_int_val (object_id,
. ival)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER ival
For a complete description of this function, see Section 1.48, OMget_int_val and OMset_int_val [page 1-100].
The id of an object, expressed as an integer.
The object's value, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ), ival_id(OIDSIZ)
INTEGER value
...
value = 15 IF (OMFfind_subobj(parent_object,
. OMstr_to_name('ival'),
. OM_OBJ_RD, . ival_id) .NE. 1)
. PRINT*,'Error searching for ival'
C
IF (OMFset_int_val(ival_id,value) .NE. 1)
. PRINT*,'Error setting value of object ival'
INTEGER FUNCTION OMFget_name_int_val (object_id,
. name,
. ival)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER name
INTEGER ival
For a complete description of this function, see Section 1.48, OMget_int_val and OMset_int_val [page 1-100].
The id of an object, expressed as an integer.
The name of one of object_id's immediate subobjects, expressed as an integer.
The subobject's value, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ)
INTEGER value
...
IF (OMFget_name_int_val(parent_object,
. OMFstr_to_name('ival'),
. value) .NE. 1)
. PRINT*,'Error getting value of object ival'
INTEGER FUNCTION OMFset_name_int_val (object_id,
. name,
. ival)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER name
INTEGER ival
For a complete description of this function, see Section 1.48, OMget_int_val and OMset_int_val [page 1-100].
The id of an object, expressed as an integer.
The name of one of object_id's immediate subobjects, expressed as an integer.
The subobject's value, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ)
INTEGER value
...
value = 15
IF (OMFset_name_int_val(parent_object,
. OMFstr_to_name('ival'),
. value) .NE. 1)
. PRINT*,'Error setting value of object ival'
INTEGER FUNCTION OMFget_name_real_val (object_id,
. name,
. dval)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER name
DOUBLE PRECISION dval
For a complete description of this function, see Section 1.61, OMget_real_val and OMset_real_val [page 1-124].
The id of an object, expressed as an integer.
The name of one of object_id's immediate subobjects, expressed as an integer.
The object's value, expressed in double precision.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ)
DOUBLE PRECISION value
...
IF (OMFget_name_real8_val(parent_object,
. OMFstr_to_name('fval'),
. value) .NE. 1)
. PRINT*,'Error getting value of object fval'
INTEGER FUNCTION OMFset_name_real_val (object_id,
. name,
. dval)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER name
DOUBLE PRECISION dval
For a complete description of this function, see Section 1.61, OMget_real_val and OMset_real_val [page 1-124].
The id of an object, expressed as an integer.
The name of one of object_id's immediate subobjects.
The subobject's value, expressed in double precision.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ)
DOUBLE PRECISION value
...
value = 0.75
IF (OMFset_name_real8_val(parent_object,
. OMFstr_to_name('fval'),
. value) .NE. 1)
. PRINT*,'Error setting value of object
INTEGER FUNCTION OMFget_name_str_val (object_id,
. name,
. cval,
. maxlen)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER name, maxlen
CHARACTER*(*) cval
For a complete description of this function, see Section 1.64, OMget_str_val and OMset_str_val [page 1-132].
The id of an object, expressed as an integer.
The name of one of object_id's immediate subobjects, expressed as an integer.
The maximum number of characters to get, expressed as an integer.
A character string specifying the subobject's value. This call requires that you pass a locally defined character variable and doesn't allow for memory allocation.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ)
CHARACTER*30 value
...
IF (OMFget_name_str_val(parent_object,
. OMFstr_to_name('cval'),
. value
. LEN(value)) .NE. 1)
. PRINT*,'Error getting value of object cval'
INTEGER FUNCTION OMFget_name_str_val (object_id,
. name,
. cval,
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER name
CHARACTER*(*) cval
For a complete description of this function, see Section 1.64, OMget_str_val and OMset_str_val [page 1-132].
The id of an object, expressed as an integer.
The name of one of object_id's immediate subobjects, expressed as an integer.
A character string specifying the subobject's value.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ)
CHARACTER*30 value
...
value = 'My String'
IF (OMFset_name_str_val(parent_object,
. OMFstr_to_name('cval'),
. value) .NE. 1)
. PRINT*,'Error setting value of object cval'
INTEGER FUNCTION OMFname_to_str (object_name,
. object_string)
INTEGER object_name
CHARACTER*(*) object_string
For a complete description of this function, see Section 1.75, OMname_to_str and OMstr_to_name [page 1-150].
An object's name, as an integer value.
An object's name, as a character string.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER name, status
CHARACTER*30 name_str
...
name = OMFstr_to_name('My string')
status = OMFname_to_str(name,name_str)
For a complete description of this function, see Section 1.75, OMname_to_str and OMstr_to_name [page 1-150]
An object's name, as a character string.
An object's name, as an integer value.
INTEGER FUNCTION OMFget_obj_name (object_id,
. object_name)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER object_name
For a complete description of this function, see Section 1.52, OMget_obj_name and OMset_obj_name [page 1-106].
The id of an object, expressed as an integer.
An new object's name, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER name
...
IF (OMFget_obj_name(object_id,
. OMFstr_to_name("new_name")) .NE. 1)
. PRINT*,'cannot set object name'
INTEGER FUNCTION OMFset_obj_name (object_id,
. object_name)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER object_name
For a complete description of this function, see Section 1.52, OMget_obj_name and OMset_obj_name [page 1-106].
The id of an object, expressed as an integer.
An new object's name, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER name
...
IF (OMFset_obj_name(object_id,
. OMFstr_to_name("new_name")) .NE. 1)
. PRINT*,'cannot set object name'
INTEGER FUNCTION OMFget_obj_parent (object_id,
. parent_id)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER parent_id(OIDSIZ)
For a complete description of this function, see Section 1.53, OMget_obj_parent [page 1-107].
The id of an object, expressed as an integer.
The parent's id, as an integer value.
The status code (see Section 1.7, Return status [page 1-22]).
C Get object var1_id's parent
#include <avs/omf.inc>
INTEGER var1_id (OIDSIZ), parent(OIDSIZ)
...
IF (OMFget_obj_parent(var1_id,
. parent) .NE. 1) PRINT*,'Object has no parent'
INTEGER FUNCTION OMFget_obj_val (object_id,
. value_id)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER value_id(OIDSIZ)
For a complete description of this function, see Section 1.57, OMget_obj_val, OMget_obj_pval, and OMset_obj_val [page 1-116].
The id of an object with mode by-reference or by-pointer, expressed as an integer.
The id of the object at the end of the chain of references, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
INTEGER FUNCTION OMFset_obj_val (object_id,
. value_id,
. mode)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER value_id(OIDSIZ)
INTEGER mode
For a complete description of this function, see Section 1.57, OMget_obj_val, OMget_obj_pval, and OMset_obj_val [page 1-116].
The id of an object with mode by-reference or by-pointer, expressed as an integer.
The pointer object's value to be set, expressed as an integer.
Reserved for future use. Set to 0 in all cases.
The status code (see Section 1.7, Return status [page 1-22]).
INTEGER FUNCTION OMFget_real8_val (object_id,
. dval)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
DOUBLE PRECISION dval
For a complete description of this function, see Section 1.61, OMget_real_val and OMset_real_val [page 1-124].
The id of an object, expressed as an integer.
The object's value, expressed in double precision.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ), fval_id(OIDSIZ)
DOUBLE PRECISION value
...
IF (OMFfind_subobj(parent_object,
. OMstr_to_name('fval'),
. OM_OBJ_RD,
. fval_id) .NE. 1)
. PRINT*,'Error searching for fval'
C
IF (OMFget_int_val(fval_id,value) .NE. 1)
. PRINT*,'Error getting value of object fval'
INTEGER FUNCTION OMFget_real8_val (object_id,
. dval)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
DOUBLE PRECISION dval
For a complete description of this function, see Section 1.61, OMget_real_val and OMset_real_val [page 1-124].
The id of an object, expressed as an integer.
The object's value, expressed in double precision.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ), fval_id(OIDSIZ)
DOUBLE PRECISION value
...
IF (OMFfind_subobj(parent_object,
. OMstr_to_name('fval'),
. OM_OBJ_RD,
. fval_id) .NE. 1)
. PRINT*,'Error searching for value'
C
value = 0.75
IF (OMFset_int_val(fval_id,value) .NE. 1)
. PRINT*,'Error setting value of object fval'
INTEGER FUNCTION OMFget_str_array_val (object_id,
. index,
. cval,
. maxlen)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER index, maxlen
CHARACTER*(*) cval
For a complete description of this function, see Section 1.63, OMget_str_array_val and OMset_str_array_val [page 1-129].
The id of an object, expressed as an integer.
The array index, expressed as an integer.
A character string specifying the object's value. This call requires that you pass a locally defined character variable and doesn't allow for memory allocation.
The maximum number of characters to get, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER strarr_id(OIDSIZ)
CHARACTER*30 value
...
IF (OMFget_str_array_val(strarr_id,
. 0,
. value,
. LEN(value)) .NE. 1)
. PRINT*,'Error getting string value of object strarr'
INTEGER FUNCTION OMFset_str_array_val (object_id,
. index,
. string)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER index
CHARACTER*(*) string
For a complete description of this function, see Section 1.63, OMget_str_array_val and OMset_str_array_val [page 1-129].
The id of an object, expressed as an integer.
The array index, expressed as an integer.
A character string specifying the object's value.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER strarr_id(OIDSIZ)
CHARACTER*30 value
...
value = 'My String'
IF (OMFset_str_array_val(strarr_id,
. 0,
. value) .NE. 1)
. PRINT*,'Error setting string value of object strarr'
INTEGER FUNCTION OMFget_str_val (object_id,
. cval,
. maxlen)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER maxlen
CHARACTER*(*) cval
For a complete description of this function, see Section 1.64, OMget_str_val and OMset_str_val [page 1-132].
The id of an object, expressed as an integer.
A character string specifying the object's value. This call requires that you pass a locally defined character variable and doesn't allow for memory allocation.
The maximum number of characters to get, expressed as an integer.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ), cval_id(OIDSIZ)
CHARACTER*30 value
...
IF (OMFfind_subobj(parent_object,
. OMstr_to_name('cval'),
. OM_OBJ_RD,
. cval_id) .NE. 1)
. PRINT*,'Error searching for cval'
C
IF (OMFget_str_val(cval_id,value,LEN(value)) .NE. 1)
. PRINT*,'Error getting value of object cval'
INTEGER FUNCTION OMFget_str_val (object_id,
. cval)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
CHARACTER*(*) cval
For a complete description of this function, see Section 1.64, OMget_str_val and OMset_str_val [page 1-132].
The id of an object, expressed as an integer.
A character string specifying the object's value. This call requires that you pass a locally defined character variable and doesn't allow for memory allocation.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ), cval_id(OIDSIZ)
CHARACTER*30 value
...
IF (OMFfind_subobj(parent_object,
. OMstr_to_name('cval'),
. OM_OBJ_RD,
. cval_id) .NE. 1)
. PRINT*,'Error searching for cval'
C
value = 'My String'
IF (OMFset_str_val(cval_id,value) .NE. 1)
. PRINT*,'Error setting value of object cval'
INTEGER FUNCTION OMFget_str_val_mode (object_id,
. cval,
. maxlen,
. mode)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER maxlen, mode
CHARACTER*(*) cval
For a complete description of this function, see Section 1.64, OMget_str_val and OMset_str_val [page 1-132].
The id of an object, expressed as an integer.
A character string specifying the object's value. This call requires that you pass a locally defined character variable and doesn't allow for memory allocation.
The maximum number of characters to get, expressed as an integer.
Translation mode, expressed as an integer - 0 for translation to take place; OM_STR_NO_I18N for no translation.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER parent_object(OIDSIZ), cval_id(OIDSIZ)
CHARACTER*30 value
...
IF (OMFfind_subobj(parent_object,
. OMstr_to_name('cval'),
. OM_OBJ_RD,
. cval_id) .NE. 1)
. PRINT*,'Error searching for cval'
C
IF (OMFget_str_val_mode(cval_id,
. value,
. LEN(value),
. OM_STR_NO_I18N) .NE. 1)
. PRINT*,'Error getting value of object cval'
INTEGER FUNCTION OMFget_sub_farray (object_id,
. ndim,
. dims,
. min,
. max,
. farray)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER ndim
INTEGER dims(ndims), min(ndims), max(ndims)
REAL farray(1)
For a complete description of this function, see Section 1.65, OMget_sub_barray and OMset_sub_barray [page 1-135].
The id of an object, expressed as an integer.
The number of dimensions in the array, expressed as an integer.
An array of ndim integer values specifying the dimensions of the array.
Arrays of ndim integer values specifying the the minimum and maximum indices to retrieve in each dimension of the array.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER ndims
INTEGER dims(OM_ARRAY_MAXDIM)
INTEGER min(OM_ARRAY_MAXDIM), max(OM_ARRAY_MAXDIM)
REAL sub(2,3,5)
...
C
C get the dimensions of object array
IF (OMFget_array_dims(array_id,
. ndims,
. dims) .NE. 1)
. PRINT*,'Error getting array dimensions of object array'
C
C set the subarray indices
min(1) = 0
max(1) = 2
min(2) = 1
max(2) = 4
min(3) = 5
max(3) = 10
...
C get the subarray
IF (OMFget_sub_farray(array_id,
. ndims,
. dims,
. min,
. max,
. sub) .NE. 1)
. PRINT*,'Error getting subarray of object array'
INTEGER FUNCTION OMFset_sub_farray (object_id,
. ndim,
. dims,
. min,
. max,
. farray)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER ndim
INTEGER dims(ndims), min(ndims), max(ndims)
REAL farray(1)
For a complete description of this function, see Section 1.65, OMget_sub_barray and OMset_sub_barray [page 1-135].
The id of an object, expressed as an integer.
The number of dimensions in the array, expressed as an integer.
An array of ndim integer values specifying the dimensions of the array.
Arrays of ndim integer values specifying the the minimum and maximum indices to set in each dimension of the array.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc> INTEGER array_id(OIDSIZ) INTEGER ndims INTEGER dims(OM_ARRAY_MAXDIM) INTEGER min(OM_ARRAY_MAXDIM), max(OM_ARRAY_MAXDIM) REAL sub(2,3,5) ... C C get the dimensions of object array IF (OMFget_array_dims(array_id,
. ndims,
. dims) .NE. 1)
. PRINT*,'Error getting array dimensions of object array' C C set the subarray indices min(1) = 0 max(1) = 2 min(2) = 1 max(2) = 4 min(3) = 5 max(3) = 10 ... C get the subarray IF (OMFset_sub_farray(array_id,
. ndims,
. dims,
. min,
. max,
. sub) .NE. 1) . PRINT*,'Error setting subarray of object array'
INTEGER FUNCTION OMFget_sub_iarray (object_id,
. ndim,
. dims,
. min,
. max,
. iarray)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER ndim
INTEGER dims(ndims), min(ndims), max(ndims)
INTEGER iarray(1)
For a complete description of this function, see Section 1.65, OMget_sub_barray and OMset_sub_barray [page 1-135].
The id of an object, expressed as an integer.
The number of dimensions in the array, expressed as an integer.
An array of ndim integer values specifying the dimensions of the array.
Arrays of ndim integer values specifying the the minimum and maximum indices to retrieve in each dimension of the array.
The returned integer subarray.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER ndims
INTEGER dims(OM_ARRAY_MAXDIM)
INTEGER min(OM_ARRAY_MAXDIM), max(OM_ARRAY_MAXDIM)
INTEGER sub(2,3,5)
...
C
C get the dimensions of object array
IF (OMFget_array_dims(array_id,
. ndims,
. dims) .NE. 1)
. PRINT*,'Error getting array dimensions of object array'
C
C set the subarray indices
min(1) = 0
max(1) = 2
min(2) = 1
max(2) = 4
min(3) = 5
max(3) = 10
...
C get the subarray
IF (OMFget_sub_iarray(array_id,
. ndims,
. dims,
. min,
. max,
. sub) .NE. 1)
. PRINT*,'Error getting subarray of object array'
INTEGER FUNCTION OMFset_sub_iarray (object_id,
. ndim,
. dims,
. min,
. max,
. iarray)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER ndim
INTEGER dims(ndims), min(ndims), max(ndims)
INTEGER iarray(1)
For a complete description of this function, see Section 1.65, OMget_sub_barray and OMset_sub_barray [page 1-135].
The number of dimensions in the array.
An array of ndim values specifying the dimensions of the array.
Arrays of ndim values specifying the the minimum and maximum indices to set in each dimension of the array.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER ndims
INTEGER dims(OM_ARRAY_MAXDIM)
INTEGER min(OM_ARRAY_MAXDIM), max(OM_ARRAY_MAXDIM)
INTEGER sub(2,3,5)
...
C
C get the dimensions of object array
IF (OMFget_array_dims(array_id,
. ndims,
. dims) .NE. 1)
. PRINT*,'Error getting array dimensions of object array'
C
C set the subarray indices
min(1) = 0
max(1) = 2
min(2) = 1
max(2) = 4
min(3) = 5
max(3) = 10
...
C get the subarray
IF (OMFset_sub_iarray(array_id,
. ndims,
. dims,
. min,
. max, . sub) .NE. 1)
. PRINT*,'Error setting subarray of object array'
INTEGER FUNCTION OMFget_sub_rarray (object_id,
. ndim,
. dims,
. min,
. max,
. rarray)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER ndim
INTEGER dims(ndims), min(ndims), max(ndims)
DOUBLE PRECISION rarray(1)
For a complete description of this function, see Section 1.65, OMget_sub_barray and OMset_sub_barray [page 1-135].
The id of an object, expressed as an integer.
The number of dimensions in the array, expressed as an integer.
An array of ndim values specifying the dimensions of the array.
Arrays of ndim integer values specifying the the minimum and maximum indices to retrieve in each dimension of the array.
The returned double-precision subarray.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER ndims
INTEGER dims(OM_ARRAY_MAXDIM)
INTEGER min(OM_ARRAY_MAXDIM), max(OM_ARRAY_MAXDIM)
DOUBLE PRECISION sub(2,3,5)
...
C
C get the dimensions of object array
IF (OMFget_array_dims(array_id,
. ndims,
. dims) .NE. 1)
. PRINT*,'Error getting array dimensions of object array'
C
C set the subarray indices
min(1) = 0
max(1) = 2
min(2) = 1
max(2) = 4
min(3) = 5
max(3) = 10
...
C get the subarray
IF (OMFget_sub_rarray(array_id,
. ndims,
. dims,
. min,
. max,
. sub) .NE. 1)
. PRINT*,'Error getting subarray of object array'
INTEGER FUNCTION OMFset_sub_rarray (object_id,
. ndim,
. dims,
. min,
. max,
. rarray)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER ndim
INTEGER dims(ndims), min(ndims), max(ndims)
DOUBLE PRECISION rarray(1)
For a complete description of this function, see Section 1.65, OMget_sub_barray and OMset_sub_barray [page 1-135].
The id of an object, expressed as an integer.
The number of dimensions in the array, expressed as an integer.
An array of ndim integer values specifying the dimensions of the array.
Arrays of ndim integer values specifying the the minimum and maximum indices to set in each dimension of the array.
The double precision subarray.
The status code (see Section 1.7, Return status [page 1-22]).
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER ndims
INTEGER dims(OM_ARRAY_MAXDIM)
INTEGER min(OM_ARRAY_MAXDIM), max(OM_ARRAY_MAXDIM)
DOUBLE PRECISION sub(2,3,5)
...
C
C get the dimensions of object array
IF (OMFget_array_dims(array_id,
. ndims,
. dims) .NE. 1)
. PRINT*,'Error getting array dimensions of object array'
C
C set the subarray indices
min(1) = 0
max(1) = 2
min(2) = 1
max(2) = 4
min(3) = 5
max(3) = 10
...
C get the subarray
IF (OMFset_sub_rarray(array_id,
. ndims,
. dims,
. min,
. max,
. sub) .NE. 1)
. PRINT*,'Error setting subarray of object array'
For a complete description of this function, see Section 1.69, OMis_null_obj [page 1-142].
The id of an object, expressed as an integer.
1 if the object id is NULL; 0 if the object id is not NULL. OM_STAT_ERROR on failure.
INTEGER FUNCTION OMFlookup_subobj (parent_id,
. name,
. mode,
. returned_id)
#include <avs/omf.inc>
INTEGER parent_id(OIDSIZ)
INTEGER name, mode
INTEGER returned_id(OIDSIZ)
For a complete description of this function, see Section 1.36, OMfind_subobj, OMlookup_subobj and OMfind_obj [page 1-69].
The id of an object, as an integer value.
The unqualified name of an object as an integer value.
Indication of how the process intends to use the object. The following constants are predefined in the include file omf.inc:
The id of the found object or OMnull_obj on failure.
1 on success; 0 if OMnull_obj is returned.
INTEGER FUNCTION OMFret_array_ptr (object_id,
. mode,
. size,
. type)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER mode
INTEGER size, type
For a complete description of this function, see Section 1.89, OMret_array_ptr [page 1-171].
The id of an object, expressed as an integer.
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:
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).
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).
The memory location of the returned array. On failure, 0 is returned.
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)
INTEGER FUNCTION OMFret_name_array_ptr (parent_id,
. name,
. mode,
. size,
. type)
#include <avs/omf.inc>
INTEGER parent_id(OIDSIZ)
INTEGER name, mode
INTEGER size, type
For a complete description of this function, see Section 1.89, OMret_array_ptr [page 1-171].
The id of an object, expressed as an integer.
The name of one of parent_id's immediate subobjects, expressed as an integer.
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:
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).
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).
The memory location of the returned array. On failure, 0 is returned.
C return the array value of object array for RD access
#include <avs/omf.inc>
INTEGER parent_id(OIDSIZ)
INTEGER type, iaddr, offset, size
REAL base(1)
...
iaddr = OMFret_name_array_ptr(parent_id,
. OMFstr_to_name('array'),
. OM_GET_ARRAY_RD,
. 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 use the values of the array
...
CALL ARRFfree(iaddr)
INTEGER FUNCTION OMFret_typed_array_ptr (object_id,
. mode,
. type,
. size)
#include <avs/omf.inc>
INTEGER object_id(OIDSIZ)
INTEGER mode, type
INTEGER size
For a complete description of this function, see Section 1.89, OMret_array_ptr [page 1-171].
The id of an object, expressed as an integer.
Integer code specifying the mode in which to retrieve the the value for the array. The following constants are predefined in the include file omf.inc:
Integer code for the array's data type. Valid types predefined in the include file omf.inc are:
The total number of values in the array. In order to pass the NULL reference, set the value to FPNULL (defined in the include file omf.inc).
The memory location of the returned array. On failure, 0 is returned.
C return the array value of object array for RW access
#include <avs/omf.inc>
INTEGER array_id(OIDSIZ)
INTEGER iaddr, offset, size
DOUBLE PRECISION base(1)
...
iaddr = OMFret_typed_array_ptr(array_id,
. OM_GET_ARRAY_RW,
. OM_TYPE_DOUBLE,
. size)
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)
![]() |
![]() |
![]() |
![]() |
![]() |
Copyright © 2001 Advanced Visual Systems
Inc.
All rights reserved.