Re: Flattening a list
Re: Flattening a list
- Subject: Re: Flattening a list
- From: Christopher Stone <email@hidden>
- Date: Sun, 16 May 2004 01:11:39 -0500
At 00:16 -0500 05/16/2004, Joseph Weaks wrought:
"Better" is somewhat subjective, but how 'bout this:
set variable to "zzz"
set a to {{2.54, 1, "z", 3}, {variable, "b", "c"}, {5, "text", variable}}
set AppleScript's text item delimiters to "%"
set a to text items of (a as string)
set AppleScript's text item delimiters to ""
______________________________________________________________________
That works nicely if maintenance of class isn't important
--> {"2.54", "1", "z", "3", "zzz", "b", "c", "5", "text", "zzz"}
All items are coerced to text.
Chris
_______________________________________________
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.