What your sample code is doing is comparing the 11th element of each of the arrays to see if they are the same which is valid. (0 biased index).
Now if you are asking if you can in one easy statement ask if all of the elements of the two arrays are the same, then the short answer is no. The compiler has very little knowledge of arrays, let alone bounds or the like.
Code:
Array1 var byte(10)
Array2 var byte(10)
xyz var word
int var byte
with the above defines you can ask for: Array1(10) and the compiler will give it to you. You can ask for Array1(20), and it will give you something. Likewise you can ask for xyz(10) and it will treat xyz as a word array and give you what ever is at the address of XYZ+20 (2 bytes per word).
But back to your original question you would need to do something like:
Code:
for i = 0 to 10
if Array1(i) <> Array2(i) then Bad
next
Ok:
...
Bad:
This could be built into some simple subroutines like memcmp(pointer1, pointer2, numberbytes), returnval
Easy to implement these in basic, would be great if BM did some of these as actual type command.
Kurt