Este é o site histórico da documentação 4D. As documentações estão sendo movidas progressivamente para developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19 R4
collection.length
|
Parâmetro | Tipo | Descrição | ||||||
collection.length | Inteiro longo |
![]() |
Number of elements in the collection | |||||
The collection.length property returns the number of elements in the collection.
The collection.length property is initialized when the collection is created. Adding or removing elements updates the length, if necessary. This property is read-only (you cannot use it to set the size of the collection).
C_COLLECTION($col) //$col.length initialized to 0
$col:=New collection("one";"two";"three") //$col.length updated to 3
$col[4]:="five" //$col.length updated to 5
$vSize:=$col.remove(0;3).length //$vSize=2