• 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: newbie question2: eof?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie question2: eof?


  • Subject: Re: newbie question2: eof?
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 31 Dec 2001 08:12:22 +1100

On 31/12/01 7:57 AM +1000, email@hidden, email@hidden, wrote:

> I would like to understand what 'eof' does in this script. (line 7 and 8)
> What does it stand for?
>
>
> on write_to_file(this_data, target_file, append_data)
> try
> set the target_file to the target_file as text
> set the open_target_file to ,
> open for access file target_file with write permission
> if append_data is false then ,
> set eof of the open_target_file to 0
> write this_data to the open_target_file starting at eof
> close access the open_target_file
> return true
> on error
> try
> close access file target_file
> on error
> end try
> return false
> end try
> end write_to_file

eof = end of file. Setting eof to 0 is effectively wiping the contents of
the file. Writing data "starting at eof" means adding on to what's already
there.


--
Shane Stanley, email@hidden


References: 
 >newbie question2: eof? (From: email@hidden)

  • Prev by Date: newbie question2: eof?
  • Next by Date: Re: [META] proper use of mailing list (was RE: Capturing current handler name in a string variable)
  • Previous by thread: newbie question2: eof?
  • Next by thread: Re: applescript-users digest, Vol 2 #1442 - 12 msgs
  • Index(es):
    • Date
    • Thread