Dies ist die alte 4D Dokumentations-Website. Die neue und aktualisierte Dokumentation finden Sie unter developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
collection.fill( )
|
collection.fill ( Wert {; StartAb {; Ende}} ) -> Funktionsergebnis | ||||||||
Parameter | Typ | Beschreibung | ||||||
Wert | Zahl, Text, Collection, Objekt, Datum, Boolean |
![]() |
Wert zum Füllen | |||||
StartAb | Lange Ganzzahl |
![]() |
Startposition (enthalten) | |||||
Ende | Lange Ganzzahl |
![]() |
Endposition (nicht enthalten) | |||||
Funktionsergebnis | Collection |
![]() |
Ursprüngliche Collection mit eingefüllten Werten | |||||
Die Funktion collection.fill( ) füllt die Collection mit dem angegebenen Wert, optional von der Position StartAb bis Ende, und gibt die resultierende Collection zurück.
Hinweis: Diese Funktion ändert die ursprüngliche Collection.
C_COLLECTION($c)
$c:=New collection(1;2;3;"Lemon";Null;"";4;5)
$c.fill("2") // $c:=[2,2,2,2,2,2,2,2]
$c.fill("Hello";5) // $c=[2,2,2,2,2,Hello,Hello,Hello]
$c.fill(0;1;5) // $c=[2,0,0,0,0,Hello,Hello,Hello]
$c.fill("world";1;-5) //-5+8=3 -> $c=[2,"world","world",0,0,Hello,Hello,Hello]
Produkt: 4D
Thema: Collections
Nummer:
805262
Erstellt: 4D v16 R6
4D Programmiersprache ( 4D v19)
4D Programmiersprache ( 4D v19.1)
4D Programmiersprache ( 4D v19.4)
4D Programmiersprache ( 4D v19.5)
4D Programmiersprache ( 4D v19.6)
4D Programmiersprache ( 4D v19.7)
4D Programmiersprache ( 4D v19.8)