Replaces an element in an SRP Fast Array with an SRP List.
Syntax
SRP_FastArray("ReplaceWithList", Handle, Field, Value, SubValue, ListHandle)
Parameters
Parameter | Description |
---|---|
Handle | Handle to an existing SRP Fast Array (REQUIRED) |
Field | Field position (REQUIRED) |
Value | Value position (REQUIRED) |
SubValue | SubValue position (REQUIRED) |
ListHandle | Handle to an SRP List to replace the given element in the SRP Fast Array (REQUIRED) |
Remarks
The ReplaceWithList service Is just like the Replace service except that you pass a handle to an SRP List instead of a BASIC+ variable. Since SRP Lists are not delimited, the list is inserted at the one delimiter level lower then as the lowest one provided, although never lower than a SubValue mark. So, if you pass an SRP List to <1, 2>, then the list will behave like an @SVM delimited list.
Examples
// Create an initialized list ListHandle = SRP_List("Create", "SRP":@FM:"Computer":@FM:"Solutions") // 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") // Replace EFG with list SRP_FastArray("ReplaceWithList", Handle, 2, 0, 0, ListHandle) // Get the final array Variable = SRP_FastArray("GetVariable", Handle) // All done SRP_FastArray("Release", Handle) SRP_List("Release", ListHandle)
Final variable looks like this:
<1> <1, 1> <1, 2> <1, 2, 1> ABC <1, 2, 2> DEF <2> <2, 1> SRP <2, 2> Computer <2, 3> Solution <3> <3, 1> <3, 1, 1> <3, 1, 2> <3, 1, 3> <3, 1, 4> <3, 1, 5> <3, 1, 6> <3, 1, 7> HIJ