• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Reversing the lines in a file[speed, stack overflow}
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Reversing the lines in a file[speed, stack overflow}
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Reversing the lines in a file[speed, stack overflow} (From: Cornwall <email@hidden>)

  • Prev by Date: Re: Reversing the lines in a file
  • Next by Date: revealing invisible files with AS, OSX
  • Previous by thread: Re: Reversing the lines in a file[speed, stack overflow}
  • Next by thread: Re: Reversing the lines in a file[speed, stack overflow}
  • Index(es):
    • Date
    • Thread