Re: List is in another list
Re: List is in another list
- Subject: Re: List is in another list
- From: Alex Zavatone <email@hidden>
- Date: Fri, 10 Sep 2010 18:13:02 -0500
Perfect, thanks.
Ya, it's less than intuitive.
On Sep 10, 2010, at 6:10 PM, Shane Stanley wrote:
> On 11/9/10 8:05 AM, "Alex Zavatone" <email@hidden> wrote:
>
>> Any thoughts?
>
> When you run:
>
> set myList to {{22.0, "0xFFB0B0B0"}, 0}
> set myVal to {22.0, "0xFFB0B0B0"}
> myList contains myVal
>
> You're actually asking AS if myval is a sublist of myList -- whether it
> contains both of myVal's values. Try this:
>
> set myList to {{22.0, "0xFFB0B0B0"}, 0}
> set myVal to {{22.0, "0xFFB0B0B0"}}
> myList contains myVal
>
> set myList to {22.0, "0xFFB0B0B0", 0}
> set myVal to {22.0, "0xFFB0B0B0"}
> myList contains myVal
>
> Not exactly intuitive, but useful because of the ability to check a sublist
> quickly.
>
> --
> Shane Stanley <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden