| 4D v18INSERT IN ARRAY | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v18
 INSERT IN ARRAY 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| INSERT IN ARRAY ( array ; where {; howMany} ) | ||||||||
| Parameter | Type | Description | ||||||
| array | Array |   | Name of the array | |||||
| where | Longint |   | Where to insert the elements | |||||
| howMany | Longint |   | Number of elements to be inserted, or 1 element if omitted | |||||
The INSERT IN ARRAY command inserts one or more elements into the array array. The new elements are inserted before the element specified by where, and are initialized to the empty value for the array type. All elements beyond where are consequently moved within the array by an offset of one or the value you pass in howMany.
If where is greater than the size of the array, the elements are added to the end of the array.
The howMany parameter is the number of elements to insert. If howMany is not specified, then one element is inserted. The size of the array grows by howMany.
The following example inserts five new elements, starting at element 10:
 INSERT IN ARRAY(anArray;10;5)The following example appends an element to an array:
 $vlElem:=Size of array(anArray)+1
 INSERT IN ARRAY(anArray;$vlElem)
 anArray{$vlElem}:=...
	Product:  4D
	Theme:  Arrays
	Number:  
        227
        
        
        
	
	Modified:  4D v11 SQL  
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v18)
	
	
	
	
	
 Add a comment
Add a comment