GetArrayInfo

PowerBuilder Native Interface

IPB_Session interface:

GetArrayInfo method

Description

Obtains information about an array.

Syntax

GetArrayInfo(pbarray array)

Argument

Description

array

A valid array handle

Return Values

PBArrayInfo*.

Examples

This IF-ELSE statement populates a PBArrayInfo structure if the array in the first value of a PBCallInfo structure is not null:

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;
}

Usage

If the array is an unbounded array, the bounds information in PBArrayInfo is undetermined. The returned PBArrayInfo must be freed later by ReleaseArrayInfo.

See Also