• 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: End of file error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: End of file error


  • Subject: Re: End of file error
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 16 Jan 2001 18:31:49 +1100

On 16/1/01 5:56 PM +1000, Paul Berkowitz, email@hidden, wrote:

> It seems that when a text file is completely blank, and you open it for
> access and try to read it, you get an "end of file error" which can mess up
> a script unless you trap it. Are there other circumstances which result in
> this same error, or can it be assumed that a file is always empty? I think a
> file length greater than 32K would also do it, yes? That can be tested for,
> too. Anything else?

32K is no problem, although a much bigger amount may cause a (different)
error, depending on memory allocation. If that's at all likely, you might as
well just "get eof" first, to cover all bases.

(You will also get an error if you use the form "read for x" if x is greater
than the length of the file.)

--
Shane Stanley, email@hidden


References: 
 >End of file error (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: scripting the Script Editor
  • Next by Date: Re: scripting the Script Editor
  • Previous by thread: End of file error
  • Next by thread: Re: End of file error
  • Index(es):
    • Date
    • Thread