Re: how to compare two lists without looping? possible?
Re: how to compare two lists without looping? possible?
- Subject: Re: how to compare two lists without looping? possible?
- From: Mark Lively <email@hidden>
- Date: Thu, 9 Feb 2006 16:01:25 -0500
On 2/9/06, demski <email@hidden> wrote:
> Hi all,
> maybe easy, maybe not?
> what I have: two lists
> set found to {"192.168.1.11","192.168.1.66"}
> set mustHave to
> {"192.168.1.11","192.168.1.66","192.168.1.34","192.168.1.44"}
>
> what would be the fastest way to create a list with the missing items like
>
> set missing to {"192.168.1.34","192.168.1.44"}
>
> feels like I would ahve to be close to it for its so easy, but...
> greetz,
>
Only with a loop
set missing to {}
repeat with anitem in musthave
if found does not contain (""&anItem)
then set missing to missing &(""&anItem)
end if
end repeat
-Mark
End of Line
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden