• 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: Converting characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting characters


  • Subject: Re: Converting characters
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 07 Aug 2001 18:07:09 -0700

On 8/7/01 3:13 PM, "Arthur J Knapp" <email@hidden> wrote:

>> Date: Tue, 07 Aug 2001 12:39:19 -0700
>> Subject: Re: Converting characters
>> From: Paul Berkowitz <email@hidden>
>
>> or else use the ASCII character definitions to be specific:
>>
>> if thechar = ASCII character 88 then --upper-case "X"
>> set newchar to "\\"
>> else if thechar = ASCII character 90 then --upper-case "Z"
>> set newchar to "\""
>> end if
>
> I'm sorry, Paul, but the above isn't true. Whether you type a
> literal letter or specify it with the ASCII commands, AppleScript
> is still going to be case-insensitive by default:
>
> set theChar to "z" -- lowercase z
>
> if theChar = ASCII character 90 then -- uppercase Z
>
> -- this will be true
>
> else
> ...
>

Thanks for the correction, Arthur. You're right.

> You would have to also convert theChar for this method to work:
>
> if (ASCII number theChar) = (ASCII character 90) then
> ...

Don't you mean:

if (ASCII number theChar) = 90 then

?

>
> Your first suggestion is the best:
>
> considering case
> ...
>
>

Yup, that's best.

--
Paul Berkowitz


References: 
 >Re: Converting characters (From: Arthur J Knapp <email@hidden>)

  • Prev by Date: Re: FWIW: Netscape register viewer and "archives"
  • Next by Date: success! (was Re: move folder & copy image ?)
  • Previous by thread: Re: Converting characters
  • Next by thread: Re: Converting characters
  • Index(es):
    • Date
    • Thread