4D v16.3

DELETE FROM ARRAY

Home

 
4D v16.3
DELETE FROM ARRAY

DELETE FROM ARRAY 


 

DELETE FROM ARRAY ( array ; where {; howMany} ) 
Parameter Type   Description
array  Array in Array from which to delete elements
where  Longint in Element at which to begin deletion
howMany  Longint in Number of elements to delete, or 1 element if omitted

The DELETE FROM ARRAY command deletes one or more elements from array. Elements are deleted starting at the element specified by where.

The howMany parameter is the number of elements to delete. If howMany is not specified, then one element is deleted. The size of the array shrinks by howMany.

The following example deletes three elements, starting at element 5:

 DELETE FROM ARRAY(anArray;5;3)

The following example deletes the last element from an array, if it exists:

 $vlElem:=Size of array(anArray)
 If($vlElem>0)
    DELETE FROM ARRAY(anArray;$vlElem)
 End if



See also 

INSERT IN ARRAY
Size of array

 
PROPERTIES 

Product: 4D
Theme: Arrays
Number: 228

This command can be run in preemptive processes

 
HISTORY 

Modified: 4D v11 SQL

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)