integer function fdds_index(bin_tag, field_tag, prime)
field_tag is a tag that identifies a field within bin_tag obtained from fdds_member.
Prime is a tag that identifies a DDS prime type. It must be compatible with the field's prime type. (For a simple byte offst, use fdds_offset.) The field offset must be compatible with the type's precision a fractional index would be useless. An error is issued, if these assumptions are violated.
Symbolic names for DDS prime types are provided in fdds.h. They correspond to Fortran types on the host computer. This allows the prime argument to be host independent. Possible values include:
Host Dependent values
prime Host Type
----- ---------
DDS_CHARACTER character
DDS_INTEGER integer
DDS_INTEGER2 integer2
DDS_LOGICAL logical
DDS_LOGICAL1 logical1
DDS_REAL real
DDS_DOUBLE double
DDS_COMPLEX complex
DDS_DBL_CPX double complex
integer bin, field
integer i_RecNum, RecNum
integer*2 buf_i2(*)
...
! index to RecNum field (integer*2)
field = fdds_member(bin, 0, 'RecNum')
i_RecNum = 1 + fdds_index(bin, field, DDS_INTEGER2)
...
RecNum = buf_i2(i_RecNum)
fdds_offset