Re: Considering case...
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