• 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: Read/Write 'as short' and 'write "" starting at'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read/Write 'as short' and 'write "" starting at'


  • Subject: Re: Read/Write 'as short' and 'write "" starting at'
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 31 Jul 2001 22:46:12 -0700

On Tuesday, July 31, 2001, at 09:49 AM, Paul Berkowitz wrote:

I think that both of the Chrises did give us detailed run-downs on this
mailing list of the read/write functionality, including either a couple of
bugs that remain to be fixed (concerning, I believe, the 'as' parameter),
when AS 1.6 was released.

Here's a message from Chris Nebel on May 7, 2001, that I kept: ...

Nice to know people save these things! The problems Arthur mentions were introduced in 1.6, and they both have workarounds.

1. read ... as short

Use "as small integer" instead.

2. 'write "" to f starting at n' to set the file position

Use 'read f from n for 0' instead. This is only slightly slower than using 'write'. Also, you could use the positioning parameters in the relevant read or write command, instead of seeking beforehand.

I believe both workarounds work on pre-1.6 systems, but I can't test that at the moment. I'd also point out that if you're coming back to read/write after a long absence, read/write as list and as record actually work now, so there's less need to do your own complex i/o.


--Chris Nebel
AppleScript Engineering


References: 
 >Re: Read/Write 'as short' and 'write "" starting at' (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Scripting VSS
  • Previous by thread: Re: Read/Write 'as short' and 'write "" starting at'
  • Next by thread: Re: set variable to pict file contents? Set file icon to variable?
  • Index(es):
    • Date
    • Thread