MACSCRPT Archives

May 2009

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version:
1.0 (Apple Message framework v935.3)
Content-Type:
text/plain; charset=US-ASCII; format=flowed; delsp=yes
Date:
Tue, 19 May 2009 16:52:35 -0400
Reply-To:
Macintosh Scripting Systems <[log in to unmask]>
Subject:
From:
Mark Lively <[log in to unmask]>
In-Reply-To:
<p06230904c638c73bcb81@[128.253.187.23]>
Content-Transfer-Encoding:
7bit
Sender:
Macintosh Scripting Systems <[log in to unmask]>
Parts/Attachments:
text/plain (30 lines)
On May 19, 2009, at 4:36 PM, Bill Steele wrote:

> I see many examples of lists of records.  E.g....
>

Try this.

set arec to {foo:1, bar:"a"}
set alist to {}
repeat 3 times
	copy arec to end of alist
end repeat
alist

When you concatenate it coerces what ever you are adding into either a  
string or a list.  Since records can be coerced into lists it makes it  
a list rather than a list containing a record.

If you want to use concatenation make it a list first.

set arec to {foo:1, bar:"a"}
set alist to {}
repeat 3 times
	set alist to alist & {arec}
end repeat
alist

-Mark
Who is on facebook, looking like a pirate.

ATOM RSS1 RSS2