Re: list as string - is this a bug?
Re: list as string - is this a bug?
- Subject: Re: list as string - is this a bug?
- From: kai <email@hidden>
- Date: Thu, 8 Sep 2005 23:01:15 +0100
On 8 Sep 2005, at 17:20, Matt Neuburg wrote:
set L to {"hoo", "ha"}
[snip]
{"hoo", item 2 of L} as string -- "hoo"
In addition to getting an item (as already noted):
{"hoo", get item 2 of L} as string --> "hooha"
...it's possible (taking Matt D's point about a reference) to coerce
the contents of the list:
contents of {"hoo", item 2 of L} as string --> "hooha"
- but evidently not the contents of an individual item:
{"hoo", contents of item 2 of L} as string --> "hoo"
In cases like this, I sometimes go back to an earlier OS to compare
behaviour. Turns out that the behaviour in OS 9.1 (AS 1.8.3) is
actually the same - so we can't even claim lack of consistency here.
However, this still *seems* like a bug to me. According to the ASLG,
a multi-item list can be coerced to a string - with just one
qualification: "Only a list whose items can all be coerced to strings
can be coerced to a string." On that basis, and since this works on
the individual item:
item 2 of L as string --> "ha"
...I'd have expected coercion of the entire list to be successful,
too - without the need to add explicit evaluations. (OK, so call me
an optimist.)
---
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