String to multiple-item list coercion
String to multiple-item list coercion
- Subject: String to multiple-item list coercion
- From: Steven Angier <email@hidden>
- Date: Fri, 20 Sep 2002 18:35:28 +1000
- Organization: Macscript.com
I may choose to live under a nice cosy rock, but I just learned that
strings can be coerced to multiple-item lists:
set {a, b, c, d, e} to "abcdefgh"
return {a, b, c, d, e}
--> {"a", "b", "c", "d", "e"}
Similarly, one can now query a particular item of a string:
item 5 of "abcdefgh"
--> "e"
I was expecting an error: "Can't get item 5 of {"abcdefgh"}." number
-1728
The ASLG (v1.3.7) indicates that this shouldn't work. I think that this
behaviour is a bug or, at best, a bad idea.
Steven Angier
Macscript.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.