Re: Reversing the lines in a file[speed, stack overflow}
Re: Reversing the lines in a file[speed, stack overflow}
- Subject: Re: Reversing the lines in a file[speed, stack overflow}
- From: email@hidden (Michael Sullivan)
- Date: Fri, 10 May 2002 14:50:53 -0400
- Organization: Society for the Incurably Pompous
At 7:15 AM -0400 5/10/02, Paul Skinner wrote:
>
> set textInput to read file ((choose file) as text) as list using delimiter
>
> return
It makes sense that this might avoid the stack overflow on 4076 item
lists, because the list is being built by the osax. If the osax
bypasses the normal methods of applescript list contruction, it might
well avoid the stack overflow problem.
>
> set fileRef to open for access file ((((path to the desktop) as text) &
>
> "Resultr") as text) with write permission
>
> set AppleScript's text item delimiters to return
>
> write ((the reverse of textInput) as text) to fileRef
What I don't understand is why this line doesn't error with a stack
overflow for a 6000 line file. It's taking a list of 6000 items, and
putting them back to a string. Is it only in one direction that there's
a problem?
Michael
--
Michael Sullivan
Business Card Express of CT Thermographers to the Trade
Cheshire, CT email@hidden
_______________________________________________
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.