Subject: | |
From: | |
Reply To: | |
Date: | Fri, 21 May 2010 11:41:03 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Fri, May 21, 2010 at 11:25 AM, Mark Lively <[log in to unmask]> wrote:
> Yes, because you are stringing together text items. Normally the text item delimiters are {""} so when you concatenate two
> strings together there is nothing between them.
No. When you *concatenate* two strings together (with the &
operator), there is nothing between them, period:
set text item delimiters to ":"
"foo" & "bar"
-- returns "foobar"
The TIDs only come in when you coerce a list to text:
{"foo","bar"} as string
-- returns "foo:bar"
The thing that is confusing with the OP's example is that & is
overloaded. When you apply it to things that aren't strings, like
folders and files, it creates a list:
POSIX file "/" & POSIX file "/bin"
-- creates the list { file "Macintosh HD:", file "Macintosh HD:bin: }
Converting such a list to a string is thus an example of the second
case instead of the first, even though '&' is involved, so the TIDs
are inserted.
--
Mark J. Reed <[log in to unmask]>
|
|
|