This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19.8
collection.clear( )

collection.clear( ) 


 

collection.clear () -> Function result 
Parameter Type   Description
Function result  Collection in Original collection with all elements removed

The collection.clear( ) method removes all elements from the collection instance and returns an empty collection.

Note: This method modifies the original collection.

Example  

 C_COLLECTION($col)
 $col:=New collection(1;2;5)
 $col.clear()
 $vSize:=$col.length //$vSize=0



See also 

collection.remove( )

 
PROPERTIES 

Product: 4D
Theme: Collections
Number: 705256

This command can be run in preemptive processes

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v16 R6

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)