This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v19.8
collection.equal( )
|
collection.equal ( collection2 {; option} ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
collection2 | Collection |
![]() |
Collection to compare | |||||
option | Longint |
![]() |
ck diacritical: diacritical evaluation ("A" # "a" for example) | |||||
Function result | Boolean |
![]() |
True if collections are identical, false otherwise | |||||
The collection.equal( ) method compares the collection with collection2 and returns true if they are identical (deep comparison).
By default, a non-diacritical evaluation is performed. If you want the evaluation to be case sensitive or to differentiate accented characters, pass the ck diacritical constant in the option parameter.
Note: Elements with Null values are not equal to Undefined elements.
C_COLLECTION($c;$c2)
C_BOOLEAN($b)
$c:=New collection(New object("a";1;"b";"orange");2;3)
$c2:=New collection(New object("a";1;"b";"orange");2;3;4)
$b:=$c.equal($c2) // false
$c:=New collection(New object("1";"a";"b";"orange");2;3)
$c2:=New collection(New object("a";1;"b";"orange");2;3)
$b:=$c.equal($c2) // false
$c:=New collection(New object("a";1;"b";"orange");2;3)
$c2:=New collection(New object("a";1;"b";"ORange");2;3)
$b:=$c.equal($c2) // true
$c:=New collection(New object("a";1;"b";"orange");2;3)
$c2:=New collection(New object("a";1;"b";"ORange");2;3)
$b:=$c.equal($c2;ck diacritical) //false
Product: 4D
Theme: Collections
Number:
805261
Created: 4D v16 R6
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)