a0GetFormatSize()

Gets the size of packed data.


Syntax

a0tError a0GetPackedSize(
a0tFormat *format,
void *address,
int count,
size_t *size );

Arguments

Namerd/wrDescription
format read Format to get the size.
address write Address of the data to get size.
count read Number of contiguous elements.
size write Size in bytes of the data.

Description

This function is used to calculate the size of a buffer (or a part of it) that could hold data, described by format, address and count. It is used to know how many bytes would be necessary to hold some data packed in a buffer.

On return of this function, the variable pointed by size contains the amount of bytes of a buffer that hold the data..


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()