Gets the number of elements in the list.

Syntax

Count = SRP_List_Count(Handle)

Returns

The number of elements in the list

Parameters

ParameterDescription
HandleHandle to an existing SRP List (REQUIRED)

Remarks

The SRP_List_Count method gets the size of the list. The count includes blank elements. In other words, this method tells you the number of elements that will results when you call SRP_List_GetVariable.

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 list
Handle = SRP_List_Create()

// Set 1 element at index 7
Index = SRP_List_SetAt(Handle, 7, "SRP")

// If we get the count, it will be 7, even though the first 6 are blank
Count = SRP_List_Count(Handle)

// Play nice with memory
SRP_List_Release(Handle)
  • No labels