• 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: Ted Wrigley <email@hidden>
  • Date: Mon, 07 Jul 2014 16:51:58 -0700

It seems to be a coercion issue: apparently applescript is trying to coerce to lists before it compares them, which is throwing something off internally.  for example, the following all come out as true (even though they maybe shouldn’t):

{{5, 3}} is in {{4, 2}, {5, 3}, {6, 4}}
{{"b"}} is in {{"a"}, {"b"}, {"c"}}
{{5}} is in {{4}, {5}, {6}}

it’s peculiar, to say the least. I can see the pattern without seeing the reason behind it (yet).

On Jul 7, 2014, at 2:55 PM, email@hidden wrote:

From: Gil Dawson <email@hidden>
Subject: A Syntax Question
Date: July 7, 2014 at 2:46:49 PM PDT
To: AS users <email@hidden>


Is it easy to see why "{5, 3} is in {{4,2}, {5, 3}, {6, 4}}" returns false?

i.e., 

log "{5, 3} is in {{4,2}, {5, 3}, {6, 4}} = " & ¬
({5, 3} is in {{4, 2}, {5, 3}, {6, 4}})


--> (*{5, 3} is in {{4,2}, {5, 3}, {6, 4}} = false*)

Something I'm missing here... Time to learn something.

--Gil


 _______________________________________________
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: Ron Hunsinger <email@hidden>
  • Prev by Date: Re: last modified file - how to catch?
  • 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