row, if rowsToInsert is the
reference to an structure row, or
rows (whole structure) if rowsToInsert
is the reference to a whole structure
Inserting will be performed into the local structure _struct
before the row given by the parameter _beforeIdx. If _beforeIdx =
_struct\DIM+1 or _beforeIdx = -1, the action will insert the given row(s) in the end of the
structure (append). If the value of the parameter _beforeIdx different,
the action ill generates the error
_ERR_RANGE_ERROR. The structures _struct and rowsToInsert must
be the same type.
If the parameter lastRow is used, the action will copy the source
structure rows determined by the parameters rowsToInsert and
lastRow. In this case both the parameters must represent a row of the
same structure.
Example:
RECORD (SD.RecordDef) _struct
RECORD (SD.RecordDef) _rowsToInsert
INT _beforeIdx
REDIM _struct[10]
REDIM _rowsToInsert[2]
; inserting 1st row in the beginning
INSERT _struct, 1, _rowsToInsert[1]
; inserting 2nd row at the end
_beforeIdx := _struct\DIM+1
INSERT _struct, _beforeIdx , _rowsToInsert[2]
; inserting the whole structure rowsToInsert in the beginning
INSERT _struct, 1 , _rowsToInsert
Example 2
Inserting the 1st and 2nd rows of the structure _rowsToInsert
at the beginning of the structure _struct.