• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
List is in another list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

List is in another list


  • Subject: List is in another list
  • From: Alex Zavatone <email@hidden>
  • Date: Fri, 10 Sep 2010 17:05:59 -0500

Hi. I'm trying to see if a list is contained within another list and surprisingly, this is failing unless I'm doing something wrong.

It works fine if the variable is an integer, but doesn't seem to work for a list. 

Any thoughts?   Code below.


set myList to {{22.0, "0xFFB0B0B0"}, 0}
set myVal to {22.0, "0xFFB0B0B0"}
set zero to 0

set myResult to zero is in myList
log myResult
set myResult to myList contains zero
log myResult

set myResult to myVal is in myList
log myResult
set myResult to myList contains myVal
log myResult

(*true*)
(*true*)
(*false*)
(*false*)


TIA, 
- Alex
 _______________________________________________
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

  • Follow-Ups:
    • Re: List is in another list
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • Next by Date: Re: List is in another list
  • Previous by thread: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • Next by thread: Re: List is in another list
  • Index(es):
    • Date
    • Thread