Futurebasic/Language/Reference/def dynamicinsertitems

= DEF DYNAMICINSERTITEMS Statement =

Statement
✔ Appearance ✔ Standard ✔ Console

Revised
November 2006 (FB 4, Release 4)

Description
This function shifts item  and all subsequent items in ,   positions higher, to leave   new items beginning at position. The total number of items in the array increases by  (or moreÑsee below), and the inserted items (beginning at  ) are filled with data located at , or with zeros if   is 0.

Note
Whether currently populated or not, a dynamic array must have held data at some point before being passed to this function.

is any FutureBASIC Dynamic Array previously dimensioned using  or.

is the array position at which the first item will be inserted. It must be &gt;= 0. will normally be less than the current number of items in the array, but can be greater. If it is greater, enough new empty items will be inserted to provide  items beginning at item. For example, if you have 10 items (0-9) in the array, and insert 2 items beginning at item #13, your array will hold the original 10 items, followed by 3 empty items (10-12), and the 2 inserted items (13-14) for a total of 15 items.

specifies the number of items to be inserted. It also represents the number by which the index of any specific item higher in the array will increase.

is an address where new data are waiting to be inserted into. These must be in the same format, with the same size elements as. In OS 9, if you pass a dereferenced handle as, you should first lock the handle. does not check to ensure there is adequate data to copy.