IPB_Session interface:
GetArrayLength method
Description
Obtains the length of an array.
Syntax
GetArrayLength(pbarray array)
Argument
|
Description
|
array
|
A valid array handle
|
Return Values
pblong.
Examples
This IF-ELSE statement
populates a PBArrayInfo structure. If the array in the first value
of a PBCallInfo structure is not null, it sets
the value of the pArrayItemCount variable to
the length of the array:
if ( !(ci->pArgs->GetAt(0)->IsNull()) )
{
array = ci->pArgs->GetAt(0)->GetArray();
pArrayInfo = session->GetArrayInfo (array);
pArrayItemCount = session->GetArrayLength(array);
}
else
{
// NULL array
pArrayItemCount = 0;
}
See Also