• 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: Considering case...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Considering case...


  • Subject: Re: Considering case...
  • From: Axel Luttgens <email@hidden>
  • Date: Sat, 22 Feb 2014 22:24:38 +0100

Le 22 févr. 2014 à 19:15, David Crowe a écrit :

> Why does this not work? It prints out that "E" is lower case.
>
>
> set c to "E"
> considering case
> 	if "a" ≤ c and c ≤ "z" then
> 		display dialog "Character '" & c & "' is lower case."
> 	end if
> end considering
>
> I've tried this on Mavericks and 10.6 and get the same thing. Using "Smile" and the standard AppleScript editor gives the same result.

Hello David,

That's because AppleScript uses lexicographic ordering for text.
As a result:

	ignoring case
		"Joe" > "joe"
		--> false
		"Joe" = "joe"
		--> true
	end ignoring

	considering case
		"Joe" > "joe"
		--> true
		"Joe" = "joe"
		--> false
	end considering

Axel


 _______________________________________________
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


  • Prev by Date: Re: Considering case...
  • Next by Date: Re: Considering case...
  • Previous by thread: Re: Considering case...
  • Next by thread: Re: Considering case...
  • Index(es):
    • Date
    • Thread