Re: List is in another list
Re: List is in another list
- Subject: Re: List is in another list
- From: Shane Stanley <email@hidden>
- Date: Sat, 11 Sep 2010 09:10:01 +1000
- Thread-topic: List is in another list
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