PalArrayHandleCount

Note: This page includes content based on the F1 documentation for Centura development. It may be partially converted to support APF development, but should be regarded to be of uncertain actuality. It is provided as is. Eventually, it should be replaced by documentation available from within Visual Studio.

SalNumber PalArrayHandleCount(SalArray<SalWindowHandle> Array)

PalArrayHandleCount method is counting items in an array returning the result. This method should be used by the framework and applications in places where the size of an array is needed.

Parameters

Name Description
SalArray<SalWindowHandle> Array The array to be counted.

Returns

The return value is the size of the array. E.g. the item count.

Comments

The SalArrayGetUpperBound method will return 0 both for an empty array and for an array with just one item. This problem is solved with the PalArrayHandleCount method which also returns the item count rather than the upper bound.

Example

Set nCount = PalArrayHandleCount( hWndArray )
While i < nCount
   <This should be the place to put the code that should be run once per array entry>
   Set i = i + 1
C# coding
nCount = Int.PalArrayHandleCount(i_hWndChild);
while (i < nCount) 
{
	<This should be the place to put the code that should be run once per array entry>
i = i + 1; }