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

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


References: 
 >Re: How to use delimiters in Standard Additions file read/write (From: Richard 23 <email@hidden>)
 >Re: How to use delimiters in Standard Additions file read/write (From: Chris Nebel <email@hidden>)
 >Re: How to use delimiters in Standard Additions file read/write (From: Devon and Cornwall <email@hidden>)

  • Prev by Date: Scripting the Mac OS X mail app
  • Next by Date: Re: QuarkXPress: finding anchored boxes
  • Previous by thread: Re: How to use delimiters in Standard Additions file read/write
  • Next by thread: Re: How to use delimiters in Standard Additions file read/write commands?
  • Index(es):
    • Date
    • Thread