The inverse of Interset
Phil Davis
revdev at pdslabs.net
Sat Nov 10 14:30:56 EST 2012
Hi Jim,
I suppose you could do a union (yielding a 3rd array) and an intersect
(yielding a 4th array) and then remove the intersect elements from the
union array. It's not what you wanted but it would work. Like so:
put arrayOne into intersectA
intersect intersectA with arrayTwo
put arrayOne into unionA
union unionA with arrayTwo
repeat for each key tKey in intersectA
delete variable unionA[tKey]
end repeat
-- now unionA contains the anti-intersection (?) of the two original arrays
Phil Davis
On 11/10/12 9:36 AM, Jim Hurley wrote:
> The intersect command (intersect arrayOne with arrayTwo) removes the elements from arrayOne that not in arrayTwo.
>
> What I need is an array of the elements removed. Intersect leaves everything but.
>
> Is there an array operation that accomplishes this?
> The dimensions of my arrays are very large and so using "is among" on the keys is not an option.
>
> Jim Hurley
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
--
Phil Davis
More information about the use-livecode
mailing list