• 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: List within a List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List within a List


  • Subject: Re: List within a List
  • From: Emmanuel <email@hidden>
  • Date: Sat, 17 Mar 2001 10:26:23 +0100

At 2:11 +0100 17/03/01, Pier Kuipers wrote:
>
>Hi all,
>
>How would I go about inserting a list into another list with vanilla AS?
>What I am trying to do is something like this:
>
>set theFirstList to {"A", "B"}
>set theSecondList to {"B", "C"}
>set theNewList to theFirstList & (theSecondList) as list
>
>-- this results in:
>--> {"A", "B", "B", "C"}
>
>-- but what I am really looking for is:
>-->{"A", "B", {"B", "C"}}

Instead of "(theSecondList) as list", say "{theSecondList}".

You may prefer:

--------------------------------------
set theNewList to {"A", "B"}
set theSecondList to {"B", "C"}
set end of theNewList to theSecondList
--------------------------------------

(which is better for AppleScript's variable management)

HTH
Emmanuel


  • Follow-Ups:
    • Re: List within a List - Thank you!
      • From: Pier Kuipers <email@hidden>
References: 
 >List within a List (From: Pier Kuipers <email@hidden>)

  • Prev by Date: Re: commands in a string..
  • Next by Date: Re: Startup items applet problem
  • Previous by thread: Re: List within a List
  • Next by thread: Re: List within a List - Thank you!
  • Index(es):
    • Date
    • Thread