[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to correctly use the new Equals()


By quick look, I think the problem is that the array with key "cc" is
compared by memory address, which is of course different.
Try:

   myArray = ["xx", 1, 2, 3]
    aa = ["aa": "aa", "bb": "bb", "cc": myArray]
    ab = ["aa": "aa", "bb": "bb", "cc": myArray]


Jussi

On Wed, Oct 9, 2024 at 7:43 PM Brian G <brian@xxxxxxxxxxxxxxxx> wrote:

> This is not equal:
>
>     Public ab As Collection
>     Public aa As Collection
>     aa = ["aa": "aa", "bb": "bb", "cc": ["xx", 1, 2, 3]]
>     ab = ["aa": "aa", "bb": "bb", "cc": ["xx", 1, 2, 3]]
>     If ab.Equals(aa) Then
>          Print "yippy"
>      Else
>          Print "boooo"
>      Endif
>
> Is there a better explanation what equals() actually means when true?
>
> --
> ~~~~ Brian
>
>

References:
How to correctly use the new Equals()Brian G <brian@xxxxxxxxxxxxxxxx>