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: Chris Nebel <email@hidden>
- Date: Thu, 22 Mar 2001 13:54:06 -0800
- Organization: Apple Computer, Inc.
Devon and Cornwall wrote:
>
Is there any difference between the following constructs and your
>
example? Is it a case of: "Do you like your eggs over easy or sunny
>
side up?" They return the same result.
>
>
read file "f" using delimiter " "
>
--> {"This", "is", "a", "test"}
>
>
Or
>
>
read file "f" as text using delimiter {" "}
>
--> {"This", "is", "a", "test"}
>
>
read file "f" using delimiter {" "}
>
--> {"This", "is", "a", "test"}
'using delimiter " "' does the same thing as 'using delimiter {" "}'. I
just prefer to not use a list if there's only one item.
As of 1.6, read assumes "as text" if you don't say otherwise, so adding
"as text" does nothing there. Pre-1.6 generally does the same, but
requires an explicit "as" parameter if you use "using delimiters", so
saying "as text" does the same thing with either version.
--Chris Nebel
AppleScript Engineering