4D v14.3

DELETE FROM ARRAY

Home

 
4D v14.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

 
PROPERTIES 

Product: 4D
Theme: Arrays
Number: 228

 
HISTORY 

Modified: 4D v11 SQL

 
SEE ALSO 

INSERT IN ARRAY
Size of array

 
ARTICLE USAGE

4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)