• 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
Re: A Syntax Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A Syntax Question


  • Subject: Re: A Syntax Question
  • From: Luther Fuller <email@hidden>
  • Date: Tue, 08 Jul 2014 11:21:58 -0500

Curiosity insisted that I did a little experimenting with this.

The script ...

set aList to {{1, 2}, {2, 3}, {3, 4}}
{2, 3} is in aList --> false

seems to have the correct syntax, at least according to my reading of the dictionaries.
But ... it does NOT return a correct result.

So, I tried variations on the theme and (avoiding other syntax that did not work)
I found something that does seem to work correctly ...

set aList to {{1, 2}, {2, 3}, {3, 4}}
{{2, 3}} is in aList --> true
{{1, 1}} is in aList --> false

I don't understand this syntax or why it should work.
It just doesn't make sense to me, but it seems to make sense to AppleScript.
It returns the correct result every time !!!



 _______________________________________________
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: A Syntax Question
      • From: Thomas Fischer <email@hidden>
    • Re: A Syntax Question
      • From: Paul Berkowitz <email@hidden>
References: 
 >A Syntax Question (From: Gil Dawson <email@hidden>)

  • Prev by Date: Re: A Syntax Question
  • Next by Date: Re: A Syntax Question
  • Previous by thread: Re: A Syntax Question
  • Next by thread: Re: A Syntax Question
  • Index(es):
    • Date
    • Thread