Re: list of lists as arrays
Re: list of lists as arrays
- Subject: Re: list of lists as arrays
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 02 Apr 2002 19:24:00 -0800
On 4/2/02 3:26 PM, "email@hidden" <email@hidden> wrote:
>
In tinkering, I also found that reading an entire line of text at a time
>
and then reallocating it in memory to the array was significantly faster than
>
doing individual reads for each value directly into the array (i.e. - into
>
the list of lists), which I am sure all the advanced programmers here already
>
knew...
>
>
E.G.:
>
-- read a line at a time (multiple values)
>
set OurLine to read OurInboundFileRefNum using [no break]
>
delimiter tab as text before return
>
set item width of my TheTestArray to OurLine
>
>
-- VS:
>
-- rather than repeatedly reading a single value at a time
>
set end of item width of TheTestArray to read [no break]
>
OurInboundFileRefNum as text before tab
>
Hmm. i usually read the whole text in at once, then use AppleScript's text
item delimiters {return} and {tab} as needed to get the separate items. That
should be much faster than reading a line at a time since tids don't require
a scripting addition (read) call.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.