hi,
I am looking for a smart way to compare two arrays, respective a subset of two arrays;
Interesting enough :
In case that I use array slicing like :
IF arr[[ 1 TO 3 ]] = arr2[[ 1 TO 3]] // array of unsigned int
WX 12 says Hasta la vista
even a arr[[ 1 TO 3 ]] and pressing the return key is enough....
in C we have the memcmp() function like
memcmp(&arr[0], &arr2[0], 3)
atm I use a workaround similar to ;
PROCEDURE _memcmp(arr1, arr2, len is unsigned int)
//dbgAssertion(TypeVar(arr1) = wlArray and TypeVar(arr2) = wlArray )
WHEN EXCEPTION IN
FOR i = 1 TO len
IF arr1 <> arr2 THEN
RESULT False
END
END
RESULT True
DO
ExceptionEnable()
RESULT False
END
But I don't like it. Ideas ?
Bjoern...