Performs an INSERT on an SRP Fast Array.
Syntax
SRP_FastArray_Insert(Handle, Field, Value, SubValue, New)
Parameters
Parameter | Description |
---|---|
Handle | Handle to an existing SRP Fast Array (REQUIRED) |
Field | Field position (REQUIRED) |
Value | Value position (REQUIRED) |
SubValue | SubValue position (REQUIRED) |
New | The new value being inserted into the SRP Fast Array (REQUIRED) |
Remarks
The SRP_FastArray_Insert method mimics the BASIC+ Insert function and works exactly the same way. Provide the new value you want to insert and pass the Field, Value, and Subvalue positions. To insert a field, set Value and SubValue to 0. To insert a value, set SubValue to 0. You can also use -1 to append the new value to the end of the given position(s).
IMPORTANT: You should always release the handle to an SRP Fast Array when you no longer need it by calling SRP_FastArray_Release.
Examples
// 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")
The final variable looks like this:
<1> <1, 1> <1, 2> <1, 2, 1> ABC <1, 2, 2> DEF <2> EFG <3> <3, 1> <3, 1, 1> <3, 1, 2> <3, 1, 3> <3, 1, 4> <3, 1, 5> <3, 1, 6>