• 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
How to use delimiters in Standard Additions file read/write commands?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to use delimiters in Standard Additions file read/write commands?


  • Subject: How to use delimiters in Standard Additions file read/write commands?
  • From: Charles Arthur <email@hidden>
  • Date: Sun, 18 Mar 2001 10:40:13 +0000

I'm interested in the file commands of the Standard Additions for reading
(and doing fast TID-based search+replace).

The syntax includes

read: Read data from a file that has been opened for access
read anything -- the reference number, alias, or file
specification of the file to read
[using delimiter anything] -- the value that separates
items to read

[using delimiters list] --
or up to 2 values that
separate items to read



However my script
----
set thefile to choose file
open for access thefile
set theend to get eof of thefile
--display dialog (theend & " bytes") as string -- used in earlier debugging
set thelist to read thefile using delimiter {" "}
close access thefile
----
fails at the "set thelist to..." point with "parameter error".

I've tried having the delimiter as a string, not a list - fails. I've tried
having delimiter "" - fails. All in the same way.

What am I overlooking?

Charles

http://www.ukclimbing.com : 1,000+ British crags, 350+ British climbing walls
- searchable by distance rock type, etc, with 5-day weather forecasts for
every one - plus maps, articles, news, and the New Routes database. There's
even a cool shop attached...


  • Follow-Ups:
    • Re: How to use delimiters in Standard Additions file read/write commands?
      • From: Devon and Cornwall <email@hidden>
  • Prev by Date: Re: Finder and the time
  • Next by Date: Re: Help; I did something stupid!
  • Previous by thread: Excel - export to html
  • Next by thread: Re: How to use delimiters in Standard Additions file read/write commands?
  • Index(es):
    • Date
    • Thread