Re: How to use delimiters in Standard Additions file read/write
Re: How to use delimiters in Standard Additions file read/write
- Subject: Re: How to use delimiters in Standard Additions file read/write
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 19 Mar 2001 09:04:10 -0800
On 3/19/01 6:46 AM, "Cannonball" <email@hidden> wrote:
>
At 8:30 AM +0000 3/19/01, Nigel Garvey wrote:
>
>
> I'm afraid I *can't* explain your results. What Victor and I have
>
> described is exactly what's needed with Mac OSses 8.6 and 9.0.4. Perhaps
>
> it's something that's been "fixed" or altered in 9.1.
>
>
Victor Yee wrote:
>
>
> I'm on 9.1 and "as list" is required with Standard Additions at 1.5.5. Is
>
> it possible this is an invisible coercion? Or that my 9.1 isn't, in some
>
> way, up to date? I'm on a G4 PCI and upgraded to 9.1 using the multiple
>
> file download that was available when
>
> announced.
>
>
This is very interesting, because when I removed all my non-standard
>
additions and run it, I still get:
>
>
{"If", "you", "know", "where", "to", "look", "for", "the"}
>
>
set thefile to choose file
>
set filRef to open for access thefile
>
set thelist to read filRef using delimiter {" "}
>
close access filRef
>
thelist
>
>
I'm on OS 9.1, AppleScript 1.6.
>
using delimiter {" "}
should be either
using delimiter " "
or
using delimiters {" "}
Maybe that's got something to do with it?
From the Standard Additions dictionary:
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
--
Paul Berkowitz