structname_fieldname_at(vector)(char)(string)

This function returns the element of a vector at a specified position.

Prototype

 
    MCO_RET	structname_fieldname_at(	/*IN*/ structname *handle, 
                          /*IN*/ uint2 index, 
                          /*OUT*/ char *result, 
                          /*IN*/ uint2 bufsize, 
                          /*OUT*/ uint2 *len);
 

Arguments

handle A pointer to a structname handle

index

A uint2 that specifies the offset from the start of the vector from which to get the value

result

A char pointer to receive the value of the element of the vector at a specified index

bufsize

The size of the result buffer

len

The number of bytes actually copied to the result buffer

Description

This function returns the element of a vector at a specified position. This method is used for vector elements that are char or string elements. The size of the char or string element can be determined by first calling structname_fieldname_at_len(). Handle is returned by classname_structname_read_handle().

Return Codes

See classname_fieldname_at (vector).

Related Topics Link IconRelated Topics