Re: Basic script blues ;-)
Re: Basic script blues ;-)
- Subject: Re: Basic script blues ;-)
- From: kai <email@hidden>
- Date: Mon, 28 Mar 2005 02:51:52 +0100
On Monday, March 28, 2005, at 01:34 am, Neil Faiman wrote:
On Mar 27, 2005, at 4:59 PM, kai wrote:
Just to be clear about this, I was referring to concatenation in the
context of the question. Obviously, other classes can be concatenated
- and the results will depend on the rules of concatenation outlined
in the ASLG.
There are two concatenation operators in AppleScript (both written
with the ampersand): the string concatenation operator and the list
concatenation operator. In the expression
X & Y
(1) if X is a string (or a variable whose value is a string), then Y
will be coerced to a string, and the result of the expression will be
the string which is the concatenation of the two strings. (2) If X is
anything else, then both X and Y will be coerced to lists, and the
result of the expression will be the list which is the concatenation
of the two lists. This will always work, because anything at all can
be coerced to a list -- the result of the coercion is just the
singleton list containing the thing that was coerced.
3) and if X is a record, then the result of concatenation will be
either a record or an error (depending on whether Y's class is a record
or something else. (Perhaps we should leave the question of how
concatenation can merge records to another day...) :-)
Best wishes,
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden