Subject: | |
From: | |
Reply To: | |
Date: | Wed, 20 May 2009 16:14:41 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On 20/05/2009, at 13:47 , Stockly, Ed wrote:
>> Concatenation is the wrong way to build up a list anyway, if you're
>> adding an
> item at a time. The "set end of" approach is always the way to go,
> whether it's
> records or something else.
>
> Agree....
>
>> List concatenation is more for combining two lists that might
>> already have
> multiple items each.
>
> Yes, but if you're dealing with records and combining lists and
> records this
> is bound to be problematic.
>
> ES
No, Ed, it is not!
Here:
set recordList to {}
set oneRecord to {foo:1, bar:"hello"}
set end of recordList to oneRecord
set twoRecord to {foo:2, bar:"Goodbye"}
set end of recordList to twoRecord
recordList
--->{{foo:1, bar:"hello"}, {foo:2, bar:"Goodbye"}}
|
|
|