• 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: Reading and writing records
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading and writing records


  • Subject: Re: Reading and writing records
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 26 Aug 2007 07:32:11 -0700

On Aug 26, 2007, at 7:13 AM, Chris wrote:

get eof of f

That _get_s the location of eof, but it doesn't CHECK that you've _reached_ eof. And since there is no way that I can tell to find out where you have reached, it is pretty useless.

Get eof before you start reading and store it in a variable. Then before each read, get eof and compare it to the stored variable. Here is some pseudocode to get you started:


set myEOF to (get eof)
repeat while (get eof) is less than myEOF
--read file and do whatever
end repeat

-- Michelle

--
The problem with political jokes is that too many of them get elected.

_______________________________________________
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/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Reading and writing records
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: Reading and writing records (From: has <email@hidden>)
 >Re: Reading and writing records (From: Chris <email@hidden>)
 >Re: Reading and writing records (From: Philip Aker <email@hidden>)
 >Re: Reading and writing records (From: Chris <email@hidden>)
 >Re: Reading and writing records (From: Philip Aker <email@hidden>)
 >Re: Reading and writing records (From: Chris <email@hidden>)

  • Prev by Date: Re: Reading and writing records
  • Next by Date: Re: getting duplicates in a list by item id
  • Previous by thread: Re: Reading and writing records
  • Next by thread: Re: Reading and writing records
  • Index(es):
    • Date
    • Thread