Article Preview
Buy Now
COLUMN
Comparing Arrays
Do two arrays share data?
Issue: 5.1 (September/October 2006)
Author: Charles Yeomans
Author Bio: Charles is the author of "I Declare: Calling External Functions in REALbasic", available online at
Article Description: No description available.
Article Length (in bytes): 10,164
Starting Page Number: 40
Article Number: 5117
Related Web Link(s):
http://www.declareSub.com
Excerpt of article text...
to compare the contents of two arrays. While this is elementary, it is not entirely trivial.
The simplest problem is to determine whether two arrays contain the same objects in the same order. More precisely, we want to determine whether two arrays list1 and list2 have the same size, and whether list1(i) equals list2(i) for every index i from 0 to UBound. The simplest implementation expresses these criteria directly.
Function Equals(list1() as Object, list2() as Object) as Boolean
...End of Excerpt. Please purchase the magazine to read the full article.