Adds an element to the end of an SRP List.
Syntax
NewIndex = SRP_List("Add", Handle, Element)
Returns
The index of the newly added element.
Parameters
| Parameter | Description |
|---|---|
| Handle | Handle to an existing SRP List (REQUIRED) |
| Element | The new value to add to the end of the list (REQUIRED) |
Remarks
The Add service appends an element to the end of the list and returns that element's index position.
Examples
// Create the list
Handle = SRP_List("Create")
// Add elements
Index = SRP_List("Add", Handle, "ABC")
Index = SRP_List("Add", Handle, "DEF")
Index = SRP_List("Add", Handle, "EFG")
// Convert the SRP List into a normal list
List = SRP_List("GetVariable", Handle, @FM)
// List = "ABC":@FM:"DEF":@FM:"EFG"
// Index = 3
// Play nice with memory
SRP_List("Release", Handle)