• 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: text vs string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: text vs string


  • Subject: Re: text vs string
  • From: email@hidden
  • Date: Tue, 6 Feb 2001 04:10:09 EST

In a message dated 2/5/01 1:29:40 PM, Michael Turner wrote:

>I have noticed several examples of scripts with the data type "text" where I
>would naturally have used "string". What is the difference between these
>data types? I suspect that some of my frustration with strings in
>AppleScript comes from utilizing them when I should be using data type
>"text"
>
>set textMessage to "Text to be displayed" as text
>set stringMessage to "More Text to be displayed" as string
>display dialog textMessage & return & stringMessage
>--> displays both messages

They are synonymous terms, AFAIK. In fact, try this:

set hstring to "hello" as string
set cls to class of hstring
display dialog cls
--> TEXT

Jeff Baumann
email@hidden
www.linkedresources.com

Comparing MHz between the G4 and Pentium is like comparing the popular vote
between Bush and Gore; it's interesting, but it isn't what matters.


  • Follow-Ups:
    • Re: text vs string
      • From: Michael Turner <email@hidden>
  • Prev by Date: Script freezes sometimes
  • Next by Date: Re: text vs string
  • Previous by thread: Re: text vs string
  • Next by thread: Re: text vs string
  • Index(es):
    • Date
    • Thread