Re: text vs string
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