This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
DELETE FROM ARRAY
|
DELETE FROM ARRAY ( array ; where {; howMany} ) | ||||||||
Parameter | Type | Description | ||||||
array | Array |
![]() |
Array from which to delete elements | |||||
where | Longint |
![]() |
Element at which to begin deletion | |||||
howMany | Longint |
![]() |
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
Product: 4D
Theme: Arrays
Number:
228
Modified: 4D v11 SQL
4D Language Reference ( 4D v20 R7)