4D v17.4

collection.concat( )

Home

 
4D v17.4
collection.concat( )

collection.concat( )  


 

Die Funktion collection.concat( ) gibt eine neue Collection mit dem Inhalt des Parameters Wert zurück, der am Ende der ursprünglichen Collection angefügt wird.

Hinweis: Diese Funktion ändert nicht die ursprüngliche Collection.

Ist Wert eine Collection, werden all seine Elemente als neue Elemente am Ende der ursprünglichen Collection hinzugefügt. Ist Wert keine Collection, wird sein Inhalt als neues Element hinzugefügt.

 C_COLLECTION($c)
 $c:=New collection(1;2;3;4;5)
 $fruits:=New collection("Orange";"Banana";"Apple";"Grape")
 $fruits.push(New object("Intruder";"Tomato"))
 $c2:=$c.concat($fruits//[1,2,3,4,5,"Orange","Banana","Apple","Grape",{"Intruder":"Tomato"}]
 $c2:=$c.concat(6;7;8) //[1,2,3,4,5,"Orange","Banana","Apple","Grape",{"Intruder":"Tomato"},6,7,8]



Siehe auch 

collection.combine( )

 
EIGENSCHAFTEN 

Produkt: 4D
Thema: Collections

Dieser Befehl kann in preemptive Prozessen laufen

 
SEITENINHALT 
 
GESCHICHTE 

 
ARTIKELVERWENDUNG

4D Programmiersprache ( 4D v17)
4D Programmiersprache ( 4D v17.1)
4D Programmiersprache ( 4D v17.2)
4D Programmiersprache ( 4D v17.3)
4D Programmiersprache ( 4D v17.4)