Counts the number of fields, values, or subvalues in an SRP Fast Array.

Syntax

Count = SRP_FastArray_Count(Handle, Field, Value)

Returns

The number of elements in the given field or value.

Parameters

ParameterDescription
HandleHandle to an existing SRP Fast Array (REQUIRED)
FieldField position (REQUIRED)
ValueValue position (REQUIRED)

Remarks

The SRP_List_Count method counts the number of fields, values, or subvalues. The count includes blank elements. To count the number of fields, set both the Field and Value parameters to 0. To count the number of values, set the Value parameter to 0.

IMPORTANT: You should always release the handle to an SRP List when you no longer need it by calling SRP_List_Release.

Examples

// Create an empty fast array
Handle = SRP_FastArray_Create()

// Insert several values
SRP_FastArray_Insert(Handle, 1, 2, 0, "ABC":@SVM:"DEF")
SRP_FastArray_Insert(Handle, 2, 0, 0, "EFG")
SRP_FastArray_Insert(Handle, 3, 1, 7, "HIJ")

// Get the final array
NumFields = SRP_FastArray_Count(Handle, 0, 0)
NumValues = SRP_FastArray_Count(Handle, 1, 0)
NumSubValues = SRP_FastArray_Count(Handle, 1, 2)
NumFields = 3 NumValues = 2 NumSubValues = 2
  • No labels