Re: problem w/ text item delimiters
Re: problem w/ text item delimiters
- Subject: Re: problem w/ text item delimiters
- From: T&B <email@hidden>
- Date: Tue, 6 Feb 2007 12:05:33 +1100
a) you want a list
so i can use that nifty text item delimiters trick to avoid having
to put newlines everywhere;-)
Using a list to build sections of a string also has a memory
management and speed advantage, I believe.
If you say:
set a to "long string"
set a to a & "another long string"
set a to a & "more long strings, many times"
etc
then AppleScript has to allocate the memory each time for the result
of a & newstring, then deallocate the old memory for a, then swap/
append etc.
But if done this way:
set a to {"long string"}
set end in a to "another long string"
set end in a to "more long strings, many times"
etc
set a to a as string
then AppleScript doesn't have to reallocate memory and append strings
with each and every append. It only does it once, when converting to
a string.
I'm sure Matt and others could explain this more accurately ;-)
Tom
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden