• 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: Michael Turner <email@hidden>
  • Date: Tue, 06 Feb 2001 10:25:48 -0500

> 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"

>
> 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

Thanks, Jeff, Pier,

One of my reference books "tao of applescript" defined them slightly
differently:
string: a collection of characters
text: a type of data in AppleScript represented by characters enclosed in
quotation marks. Also an object in Scriptable Text Editor.

Now, I clearly understand that they mean the same thing exactly.

Wow: Pier just turned me on to the "AppleScript Language Guide":
http://developer.apple.com/techpubs/macos8/InterproCom/AppleScriptScripters/
applescriptscripters.html

-Michael


References: 
 >Re: text vs string (From: email@hidden)

  • Prev by Date: RE: sub-folders and file listing
  • Next by Date: Re: sub-folders and file listing
  • Previous by thread: Re: text vs string
  • Next by thread: Re: text vs string
  • Index(es):
    • Date
    • Thread