Re: Re: text vs string
Re: Re: text vs string
- Subject: Re: Re: text vs string
- From: Emmanuel <email@hidden>
- Date: Wed, 7 Feb 2001 01:05:16 +0100
At 18:50 +0100 6/02/01, email@hidden wrote:
>
log text
>
-- > (*text*)
>
log string
>
--> (*string*)
>
log class of text
>
--> (*class*)
>
log class of "string"
>
--> (*string*)
>
display dialog class of "string" giving up after 1
>
--> TEXT
>
display dialog text giving up after 1
>
--> ctxt
>
display dialog class of text giving up after 1
>
--> pcls
>
display dialog class of text as string giving up after 1
>
--> class
>
display dialog class of (text as string) giving up after 1
>
--> TEXT
>
>
Apparently anything logged gets coerced to a string first, but not that which
>
is displayed in a dialog. Personally, I would prefer it be the other way
>
around.
I'm popping into this thread, sorry. Just to mention that, as can be found
thanks to display dialog, "string"'s internal code is "TEXT", while
"text"'s code is "ctxt". These are two different types. It only depends on
the programmer whether coercing to text or to string ("tell app to get
this_or_that as text / as string") will return different results or not.
Emmanuel