Re: [Vala] comparison of arrays in Vala



Struct comparison was added few time ago.. Maybe we should add the same for arrays.

On Jun 20, 2010, at 1:27 AM, Celil <celil kj gmail com> wrote:

Hello,

I just tried the following, and the assertion fails.

   int[] x = {1,2};
   int[] y = {1,2};
   assert( x == y);

I suppose Vala compares the memory locations of x and y instead of the
content of the arrays. Is there an easy way to compare two arrays
without having to loop though them in vala?

Celil
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list




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