Futurebasic/Language/Reference/def dynamicremoveitems

= DEF DYNAMICREMOVEITEMS Statement =

Statement
✔ Appearance ✔ Standard ✔ Console

Revised
November 2006 (FB 4, Release 4)

Description
This function deletes  items from , beginning with item. Any subsequent items will shift down to replace the removed items, resulting in an array of  fewer items. Each subsequent item will have its index reduced by. If  is 0, the data will be expunged without warning or recourse. If a pointer is passed in, the data to be removed will first be copied to that address.

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 of the first item to be removed. It must be &gt;= 0. will not remove more items than exist in the array. For example, if your array holds 10 items (0-9) and you attempt to remove 5 items beginning with item 8, 2 items (8-9) will be removed instead and the array will be left with 8 items (0-7).

specifies the number of contiguous items to be removed. If there are too few items following  only the number available will be removed. is an address to which the items being removed from  will be copied.

must point to an allocated memory block (or variable) of adequate size to hold all data being removed. does not check to ensure there is adequate space. If there are fewer than  items available to remove, only the number removed will be copied to. To remove data without saving it, pass 0 in.