Re: coercing a list
Re: coercing a list
- Subject: Re: coercing a list
- From: "Serge Belleudy-d'Espinose" <email@hidden>
- Date: Wed, 29 Aug 2001 16:28:55 +0200
At 0:16 +1000 30/08/01, Ray Phillips wrote:
>
Why does
>
>
{"a", "b", "c"} as string
>
>
yield "a b c" instead of "abc" ? Can it be made to omit the extra spaces?
When coercing a list into a string, AppleScript uses a global variable called 'applescript's text item delimiters' and inserts it between each item.
At first, this variable is "", so your list should coerce ok.
If it does not, something has probably changed the atids to " ". You can change them back:
set AppleScript's text item delimiters to ""
and then do your coercion.
There is far more about the use of atids, but this is a complete story by itself, and so essential to AS that it would require several mails to tell it.
Anyway the atids are normally reset when you quit your AS editor.
Serge
--
\\//\//\// Serge Belleudy-d'Espinose Institut Jacques Monod
// // //
http://www.ijm.jussieu.fr/ Univ. Jussieu - Paris
//\//\//\\