Inserts an SRP List into an SRP Fast Array

Syntax

SRP_FastArray("InsertFromList", Handle, Field, Value, SubValue, ListHandle)

Parameters

ParameterDescription
HandleHandle to an existing SRP Fast Array (REQUIRED)
FieldField position (REQUIRED)
ValueValue position (REQUIRED)
SubValueSubValue position (REQUIRED)
HandleHandle to an SRP List being inserted into the SRP Fast Array (REQUIRED)

Remarks

The InsertFromList service Is just like the Insert 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 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")

// Now insert the SRP List as subvalues
SRP_FastArray("InsertFromList", Handle, 2, 1, 1, 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>
  <2, 1, 1> SRP
  <2, 1, 2> Computer
  <2, 1, 3> Solutions
  <2, 1, 4> EFG
<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
  • No labels