• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: coercing a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
//\//\//\\


References: 
 >coercing a list (From: Ray Phillips <email@hidden>)

  • Prev by Date: coercing a list
  • Next by Date: Skip a step in a repeat loop
  • Previous by thread: coercing a list
  • Next by thread: Re: coercing a list
  • Index(es):
    • Date
    • Thread