a0GetFormatOffset()

Gets the address of an element with a format.


Syntax

a0tError a0GetElementOffset(
a0tFormat *format,
void *address,
int count,
void **offset );

Arguments

Namerd/wrDescription
format read Format to use.
address write Address of the beginning of the data.
count read Number of the element.
offset write Address of the element.

Description

This function is used to calculate the address of an element inside formatted data. The address of the wanted element is found by skipping count elements of format format, from the starting address address.

This function is used to successively send or pack parts of formatted data. It allows the program to calculate the memory address of the data existing just after the amount sent or packed.

On return of this function, the variable pointed by offset contains the address of the given element with a format.


Return Values

If an error condition occurs, it returns the error code, otherwise it returns A0ErrOk. Possible values are as follows:
Error CodeDescription
A0ErrOkSuccessful completion.

See Also

a0UseFormats() a0NewMapFormat() a0NewFunctionFormat()