Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The SRP_FastArray_ReplaceWithList method Is just like the SRP_FastArray_Replace method 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.

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

Examples

Code Block
// 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)

...

Code Block
<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